vsn 0.1.65 → 0.1.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/demo.html +9 -2
- package/demo/vsn.js +2 -2
- package/dist/Scope.d.ts +1 -0
- package/dist/Scope.js +8 -4
- package/dist/Scope.js.map +1 -1
- package/dist/vsn.min.js +2 -0
- package/package.json +1 -1
- package/src/Scope.ts +8 -2
package/package.json
CHANGED
package/src/Scope.ts
CHANGED
|
@@ -229,10 +229,16 @@ export class Scope extends EventDispatcher {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
export class FunctionScope extends Scope {
|
|
232
|
+
constructor(parentScope?: Scope) {
|
|
233
|
+
super(parentScope);
|
|
234
|
+
this.addRelay(parentScope);
|
|
235
|
+
}
|
|
236
|
+
|
|
232
237
|
set(key: string, value: any) {
|
|
233
|
-
if (this.parentScope.has(key) || ['$', '@'].indexOf(key[0]) > -1)
|
|
238
|
+
if (this.parentScope.has(key) || ['$', '@'].indexOf(key[0]) > -1) {
|
|
234
239
|
this.parentScope.set(key, value);
|
|
235
|
-
else
|
|
240
|
+
} else {
|
|
236
241
|
super.set(key, value);
|
|
242
|
+
}
|
|
237
243
|
}
|
|
238
244
|
}
|