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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vsn",
3
- "version": "0.1.65",
3
+ "version": "0.1.66",
4
4
  "description": "SEO Friendly Javascript/Typescript Framework",
5
5
  "keywords": [
6
6
  "framework",
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
  }