$.proxy is deprecated

$.trim is deprecated
This commit is contained in:
djmaze 2020-08-06 18:24:46 +02:00
parent ae1b7610fd
commit bbd9f49dcd
39 changed files with 153 additions and 173 deletions

View file

@ -1,6 +1,6 @@
import ko from 'ko';
import { windowResizeCallback, trim, delegateRunOnDestroy } from 'Common/Utils';
import { windowResizeCallback, delegateRunOnDestroy } from 'Common/Utils';
import { StorageResultType, Notification } from 'Common/Enums';
import { getNotification } from 'Common/Translator';
@ -61,7 +61,7 @@ class FiltersUserSettings {
@command((self) => self.haveChanges())
saveChangesCommand() {
if (!this.filters.saving()) {
if (this.filterRaw.active() && !trim(this.filterRaw())) {
if (this.filterRaw.active() && !this.filterRaw().trim()) {
this.filterRaw.error(true);
return false;
}

View file

@ -1,7 +1,6 @@
import ko from 'ko';
import { ClientSideKeyName, Notification, Magics } from 'Common/Enums';
import { trim } from 'Common/Utils';
import { getNotification, i18n } from 'Common/Translator';
import { removeFolderFromCacheList } from 'Common/Cache';
@ -42,7 +41,7 @@ class FoldersUserSettings {
}
folderEditOnEnter(folder) {
const nameToEdit = folder ? trim(folder.nameForEdit()) : '';
const nameToEdit = folder ? folder.nameForEdit().trim() : '';
if (nameToEdit && folder.name() !== nameToEdit) {
Local.set(ClientSideKeyName.FoldersLashHash, '');