Skip to content

Commit

Permalink
modify "this" for "use strict"
Browse files Browse the repository at this point in the history
if someone use ES6 or Babel default transform, the js code will under the strict mode.so "this" will become undefined.
  • Loading branch information
zhaiyb committed Apr 26, 2016
1 parent 9d03fff commit bb06ea4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.selectBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @param {Object} options
* @constructor
*/
var SelectBox = this.SelectBox = function (select, options) {
var SelectBox = window.SelectBox = function (select, options) {
if (select instanceof jQuery) {
if (select.length > 0) {
select = select[0];
Expand Down

0 comments on commit bb06ea4

Please sign in to comment.