mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-08 13:45:28 -05:00
Code review feedback--use an arrow function instead of aliasing this
This commit is contained in:
@@ -115,12 +115,11 @@ $.extend(selectInputBinding, {
|
||||
$(el).trigger('change');
|
||||
},
|
||||
subscribe: function(el, callback) {
|
||||
var thiz = this;
|
||||
$(el).on('change.selectInputBinding', function(event) {
|
||||
$(el).on('change.selectInputBinding', event => {
|
||||
// https://github.com/rstudio/shiny/issues/2162
|
||||
// Prevent spurious events that are gonna be squelched in
|
||||
// a second anyway by the onItemRemove down below
|
||||
if (el.nonempty && thiz.getValue(el) === "") {
|
||||
if (el.nonempty && this.getValue(el) === "") {
|
||||
return;
|
||||
}
|
||||
callback();
|
||||
|
||||
Reference in New Issue
Block a user