Removed and disabled use of Ember.js function prototype extensions
no issue - Function prototype extensions are being deprecated in Ember 3.11
This commit is contained in:
parent
f50113ee94
commit
eb731db4d2
|
@ -4,10 +4,6 @@ import {run} from '@ember/runloop';
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
tagName: '',
|
tagName: '',
|
||||||
|
|
||||||
init() {
|
|
||||||
this._super(...arguments);
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
initScrollWatch(element) {
|
initScrollWatch(element) {
|
||||||
this._onScroll = run.bind(this, this.onScroll, element);
|
this._onScroll = run.bind(this, this.onScroll, element);
|
||||||
|
|
|
@ -2,6 +2,7 @@ import Mixin from '@ember/object/mixin';
|
||||||
import {A as emberA} from '@ember/array';
|
import {A as emberA} from '@ember/array';
|
||||||
import {isEmpty} from '@ember/utils';
|
import {isEmpty} from '@ember/utils';
|
||||||
import {observer} from '@ember/object';
|
import {observer} from '@ember/object';
|
||||||
|
import {on} from '@ember/object/evented';
|
||||||
import {run} from '@ember/runloop';
|
import {run} from '@ember/runloop';
|
||||||
|
|
||||||
export default Mixin.create({
|
export default Mixin.create({
|
||||||
|
@ -38,9 +39,9 @@ export default Mixin.create({
|
||||||
},
|
},
|
||||||
|
|
||||||
// eslint-disable-next-line ghost/ember/no-observers
|
// eslint-disable-next-line ghost/ember/no-observers
|
||||||
hasErrorObserver: observer('errors.[]', 'property', 'hasValidated.[]', function () {
|
hasErrorObserver: on('init', observer('errors.[]', 'property', 'hasValidated.[]', function () {
|
||||||
run.once(this, 'setHasError');
|
run.once(this, 'setHasError');
|
||||||
// this.setHasError();
|
// this.setHasError();
|
||||||
}).on('init')
|
}))
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@ import {compare} from '@ember/utils';
|
||||||
import {computed, observer} from '@ember/object';
|
import {computed, observer} from '@ember/object';
|
||||||
import {equal, filterBy} from '@ember/object/computed';
|
import {equal, filterBy} from '@ember/object/computed';
|
||||||
import {isBlank} from '@ember/utils';
|
import {isBlank} from '@ember/utils';
|
||||||
|
import {on} from '@ember/object/evented';
|
||||||
import {inject as service} from '@ember/service';
|
import {inject as service} from '@ember/service';
|
||||||
|
|
||||||
// ember-cli-shims doesn't export these so we must get them manually
|
// ember-cli-shims doesn't export these so we must get them manually
|
||||||
|
@ -228,10 +229,10 @@ export default Model.extend(Comparable, ValidationEngine, {
|
||||||
|
|
||||||
// TODO: is there a better way to handle this?
|
// TODO: is there a better way to handle this?
|
||||||
// eslint-disable-next-line ghost/ember/no-observers
|
// eslint-disable-next-line ghost/ember/no-observers
|
||||||
_setPublishedAtBlogTZ: observer('publishedAtUTC', 'settings.activeTimezone', function () {
|
_setPublishedAtBlogTZ: on('init', observer('publishedAtUTC', 'settings.activeTimezone', function () {
|
||||||
let publishedAtUTC = this.publishedAtUTC;
|
let publishedAtUTC = this.publishedAtUTC;
|
||||||
this._setPublishedAtBlogStrings(publishedAtUTC);
|
this._setPublishedAtBlogStrings(publishedAtUTC);
|
||||||
}).on('init'),
|
})),
|
||||||
|
|
||||||
_setPublishedAtBlogStrings(momentDate) {
|
_setPublishedAtBlogStrings(momentDate) {
|
||||||
if (momentDate) {
|
if (momentDate) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ module.exports = function (environment) {
|
||||||
Date: false,
|
Date: false,
|
||||||
Array: true,
|
Array: true,
|
||||||
String: true,
|
String: true,
|
||||||
Function: true
|
Function: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue