Skip to content

Commit a3c67da

Browse files
Magento_Ui messages js - Using .bind to remove the need for self
1 parent 339cc26 commit a3c67da

File tree

1 file changed

+2
-4
lines changed
  • app/code/Magento/Ui/view/frontend/web/js/view

1 file changed

+2
-4
lines changed

app/code/Magento/Ui/view/frontend/web/js/view/messages.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,11 @@ define([
6565
* @param {Boolean} isHidden
6666
*/
6767
onHiddenChange: function (isHidden) {
68-
var self = this;
69-
7068
// Hide message block if needed
7169
if (isHidden) {
7270
setTimeout(function () {
73-
$(self.selector).hide('blind', {}, self.hideSpeed);
74-
}, self.hideTimeout);
71+
$(this.selector).hide('blind', {}, this.hideSpeed);
72+
}.bind(this), this.hideTimeout);
7573
}
7674
}
7775
});

0 commit comments

Comments
 (0)