Skip to content

Commit

Permalink
Merge pull request #46 from yapplabs/enspandi-andi/check-for-initiali…
Browse files Browse the repository at this point in the history
…zation

Add additional check for meta.isInitializing (With node update)
  • Loading branch information
lukemelia authored Apr 9, 2019
2 parents d7f96ce + d30c9c7 commit 437ee89
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "4"
- "6"

sudo: required
dist: trusty
Expand All @@ -20,6 +20,8 @@ env:
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-lts-3.4
- EMBER_TRY_SCENARIO=ember-lts-3.8
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
Expand Down
6 changes: 3 additions & 3 deletions addon/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export default Ember.Mixin.create({
setUnknownProperty(key, value) {
const m = meta(this);

if (m.proto === this) {
// if marked as prototype then just defineProperty
// rather than delegate
if (m.proto === this || (m.isInitializing && m.isInitializing())) {
// if marked as prototype or object is initializing then just
// defineProperty rather than delegate
defineProperty(this, key, null, value);
return value;
}
Expand Down
16 changes: 16 additions & 0 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ module.exports = {
}
}
},
{
name: 'ember-lts-3.4',
npm: {
devDependencies: {
'ember-source': '~3.4.0'
}
}
},
{
name: 'ember-lts-3.8',
npm: {
devDependencies: {
'ember-source': '~3.8.0'
}
}
},
{
name: 'ember-release',
bower: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"loader.js": "^4.2.3"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
"node": "6.* || 8.* || 10.* || >= 12.*"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down

0 comments on commit 437ee89

Please sign in to comment.