_.bind(function, object) to function.bind(object)

This commit is contained in:
djmaze 2020-07-20 15:47:33 +02:00
parent db2d95d684
commit af136f46c4
23 changed files with 38 additions and 45 deletions

View file

@ -205,7 +205,7 @@ class ContactsPopupView extends AbstractViewNext {
this.viewHash = ko.computed(() => '' + _.map(this.viewProperties(), (oItem) => oItem.value()).join(''));
// this.saveCommandDebounce = _.debounce(_.bind(this.saveCommand, this), 1000);
// this.saveCommandDebounce = _.debounce(this.saveCommand.bind(this), 1000);
this.viewHash.subscribe(() => {
if (this.watchHash() && !this.viewReadOnly() && !this.watchDirty()) {
@ -482,7 +482,7 @@ class ContactsPopupView extends AbstractViewNext {
deleteSelectedContacts() {
if (0 < this.contactsCheckedOrSelected().length) {
Remote.contactsDelete(_.bind(this.deleteResponse, this), this.contactsCheckedOrSelectedUids());
Remote.contactsDelete(this.deleteResponse.bind(this), this.contactsCheckedOrSelectedUids());
this.removeCheckedOrSelectedContactsFromList();
}