Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
fix(attribute): fix null check
Browse files Browse the repository at this point in the history
adds a null check to parent element
  • Loading branch information
zewa666 committed Aug 21, 2015
1 parent 62742d1 commit 0bf67dd
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/*"
}
Expand Down
2 changes: 1 addition & 1 deletion dist/amd/t.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/commonjs/t.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/es6/t.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/system/t.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/t.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 0bf67dd

Please sign in to comment.