REFACTOR - remove _.debounce and _.isEqual
Lodash is being removed from core Discourse.
Dieser Commit ist enthalten in:
Ursprung
662c7432ef
Commit
866926501f
2 geänderte Dateien mit 26 neuen und 24 gelöschten Zeilen
|
@ -3,6 +3,7 @@ import { default as wizardSchema } from '../lib/wizard-schema';
|
|||
import { set, get } from "@ember/object";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
import { observes } from 'discourse-common/utils/decorators';
|
||||
import { deepEqual } from 'discourse-common/lib/object';
|
||||
|
||||
export default Mixin.create({
|
||||
didInsertElement() {
|
||||
|
@ -90,7 +91,7 @@ export default Mixin.create({
|
|||
toggleUndo() {
|
||||
const current = this.get(this.componentType);
|
||||
const original = this.originalObject;
|
||||
this.set('showUndo', !_.isEqual(current, original));
|
||||
this.set('showUndo', !deepEqual(current, original));
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { CANCELLED_STATUS } from 'discourse/lib/autocomplete';
|
||||
import getUrl from 'discourse-common/lib/get-url';
|
||||
import discourseDebounce from "discourse/lib/debounce";
|
||||
|
||||
var cache = {},
|
||||
cacheTopicId,
|
||||
|
@ -39,7 +40,7 @@ function performSearch(term, topicId, includeGroups, includeMentionableGroups, i
|
|||
});
|
||||
}
|
||||
|
||||
var debouncedSearch = _.debounce(performSearch, 300);
|
||||
var debouncedSearch = discourseDebounce(performSearch, 300);
|
||||
|
||||
function organizeResults(r, options) {
|
||||
if (r === CANCELLED_STATUS) { return r; }
|
||||
|
|
Laden …
In neuem Issue referenzieren