Use yield* instead of iterating and yielding actions
[MAILPOET-2681]
This commit is contained in:
committed by
Veljko V
parent
780169f86c
commit
70646358df
@@ -122,13 +122,7 @@ export function* verifyPremiumKey(key: string) {
|
|||||||
let pluginActive = res.meta.premium_plugin_active;
|
let pluginActive = res.meta.premium_plugin_active;
|
||||||
|
|
||||||
if (!pluginInstalled) {
|
if (!pluginInstalled) {
|
||||||
const actions = installPremiumPlugin();
|
pluginInstalled = yield* installPremiumPlugin();
|
||||||
let action = actions.next();
|
|
||||||
while (!action.done) {
|
|
||||||
yield action.value;
|
|
||||||
action = actions.next();
|
|
||||||
}
|
|
||||||
pluginInstalled = action.value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pluginInstalled && !pluginActive) {
|
if (pluginInstalled && !pluginActive) {
|
||||||
|
Reference in New Issue
Block a user