0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 02:50:28 +01:00

Merge pull request #55 from jbrw/master

REFACTOR - remove _.debounce and _.isEqual
Dieser Commit ist enthalten in:
Angus McLeod 2020-10-01 08:03:45 +10:00 committet von GitHub
Commit 5c65a8d9f8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 26 neuen und 24 gelöschten Zeilen

Datei anzeigen

@ -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: {

Datei anzeigen

@ -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; }