mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
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
7210266ffe
commit
6ac1480ffc
@ -4,10 +4,6 @@ import {run} from '@ember/runloop';
|
||||
export default Component.extend({
|
||||
tagName: '',
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
},
|
||||
|
||||
actions: {
|
||||
initScrollWatch(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 {isEmpty} from '@ember/utils';
|
||||
import {observer} from '@ember/object';
|
||||
import {on} from '@ember/object/evented';
|
||||
import {run} from '@ember/runloop';
|
||||
|
||||
export default Mixin.create({
|
||||
@ -38,9 +39,9 @@ export default Mixin.create({
|
||||
},
|
||||
|
||||
// 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');
|
||||
// this.setHasError();
|
||||
}).on('init')
|
||||
}))
|
||||
|
||||
});
|
||||
|
@ -9,6 +9,7 @@ import {compare} from '@ember/utils';
|
||||
import {computed, observer} from '@ember/object';
|
||||
import {equal, filterBy} from '@ember/object/computed';
|
||||
import {isBlank} from '@ember/utils';
|
||||
import {on} from '@ember/object/evented';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
// 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?
|
||||
// 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;
|
||||
this._setPublishedAtBlogStrings(publishedAtUTC);
|
||||
}).on('init'),
|
||||
})),
|
||||
|
||||
_setPublishedAtBlogStrings(momentDate) {
|
||||
if (momentDate) {
|
||||
|
@ -17,7 +17,7 @@ module.exports = function (environment) {
|
||||
Date: false,
|
||||
Array: true,
|
||||
String: true,
|
||||
Function: true
|
||||
Function: false
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user