diff --git a/config.js b/config.js index bb416fa..8d6c9d0 100644 --- a/config.js +++ b/config.js @@ -3,11 +3,12 @@ System.config({ "transpiler": "babel", "babelOptions": { "optional": [ - "es7.decorators" + "runtime", + "es7.decorators", + "es7.classProperties" ] }, "paths": { - "aurelia-i18next/*": "dist\\system/*js", "github:*": "jspm_packages/github/*", "npm:*": "jspm_packages/npm/*" } diff --git a/dist/amd/t.js b/dist/amd/t.js index 61f4bba..fbe6960 100644 --- a/dist/amd/t.js +++ b/dist/amd/t.js @@ -46,7 +46,7 @@ define(['exports', './i18n', 'aurelia-templating'], function (exports, _i18n, _a _createClass(_TCustomAttribute, [{ key: 'valueChanged', value: function valueChanged() { - if (this.element.parentElement !== undefined) { + if (this.element.parentElement !== undefined && this.element.parentElement !== null) { this.service.updateTranslations(this.element.parentElement); } } diff --git a/dist/commonjs/t.js b/dist/commonjs/t.js index 51866ac..26f22db 100644 --- a/dist/commonjs/t.js +++ b/dist/commonjs/t.js @@ -49,7 +49,7 @@ var TCustomAttribute = (function () { _createClass(_TCustomAttribute, [{ key: 'valueChanged', value: function valueChanged() { - if (this.element.parentElement !== undefined) { + if (this.element.parentElement !== undefined && this.element.parentElement !== null) { this.service.updateTranslations(this.element.parentElement); } } diff --git a/dist/es6/t.js b/dist/es6/t.js index 75141d0..f9254c3 100644 --- a/dist/es6/t.js +++ b/dist/es6/t.js @@ -24,7 +24,7 @@ export class TCustomAttribute { } valueChanged(){ - if(this.element.parentElement !== undefined) { + if(this.element.parentElement !== undefined && this.element.parentElement !== null) { this.service.updateTranslations(this.element.parentElement); } } diff --git a/dist/system/t.js b/dist/system/t.js index 44b1a76..bd06a0d 100644 --- a/dist/system/t.js +++ b/dist/system/t.js @@ -51,7 +51,7 @@ System.register(['./i18n', 'aurelia-templating'], function (_export) { _createClass(_TCustomAttribute, [{ key: 'valueChanged', value: function valueChanged() { - if (this.element.parentElement !== undefined) { + if (this.element.parentElement !== undefined && this.element.parentElement !== null) { this.service.updateTranslations(this.element.parentElement); } } diff --git a/package.json b/package.json index 127e3f8..db1f45a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-i18next", - "version": "0.7.0", + "version": "0.7.1", "description": "An Aurelia-Wrapper for the library i18next", "keywords": [ "aurelia", diff --git a/src/t.js b/src/t.js index 75141d0..f9254c3 100644 --- a/src/t.js +++ b/src/t.js @@ -24,7 +24,7 @@ export class TCustomAttribute { } valueChanged(){ - if(this.element.parentElement !== undefined) { + if(this.element.parentElement !== undefined && this.element.parentElement !== null) { this.service.updateTranslations(this.element.parentElement); } }