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

Fix ember-getowner-polyfill deprecation #447

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addon/mixin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from 'ember';
import Errors from 'ember-validations/errors';
import Base from 'ember-validations/validators/base';
import getOwner from 'ember-getowner-polyfill';

const {
A: emberArray,
Expand Down Expand Up @@ -42,7 +41,7 @@ const pushValidatableObject = function(model, property) {
};

const lookupValidator = function(validatorName) {
let owner = getOwner(this);
let owner = Ember.getOwner(this);
let service = owner.lookup('service:validations');
let validators = [];
let cache;
Expand Down Expand Up @@ -113,6 +112,8 @@ export default Mixin.create(setValidityMixin, {

if (get(this, 'validations') === undefined) {
this.validations = {};
} else {
this.validations = get(this, 'validations');
}

this.buildValidators();
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
"ember-addon"
],
"dependencies": {
"ember-cli-babel": "^5.1.6",
"ember-getowner-polyfill": "^1.0.0"
"ember-cli-babel": "^5.1.6"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down