@makano/rew 1.2.84 → 1.2.85
Sign up to get free protection for your applications and to get access to all the features.
package/lib/rew/const/usage.js
CHANGED
@@ -128,8 +128,10 @@ module.exports.prepareContext = function (
|
|
128
128
|
childContext.currentNamespace = name.namespace;
|
129
129
|
childContext.parentNamespace = parentContext;
|
130
130
|
const code = `(${trigger.toString()})()`;
|
131
|
-
if(name.onUse) name.onUse();
|
132
|
-
|
131
|
+
if(name.onUse) name.onUse();
|
132
|
+
const r = runtime.exec(code, childContext, code, context.module.filepath);
|
133
|
+
if(name.onAfterUse) name.onAfterUse();
|
134
|
+
return r;
|
133
135
|
} else if(name instanceof Usage) {
|
134
136
|
const v = name.trigger(...params) || true;
|
135
137
|
if(name.save !== false) context.__using__[name.name] = v;
|