diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2021-11-19 00:47:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 00:47:56 +0100 |
commit | ed637b04d75e4ebd6ea523f23e6dee7f64b68145 (patch) | |
tree | 5f54903bbca19578ba4e6c8c9c57e3cbf9ccba43 /Gruntfile.js | |
parent | b52ee4012d13e2f531a39fe0a53366e119dd1501 (diff) | |
download | jquery-ui-ed637b04d75e4ebd6ea523f23e6dee7f64b68145.tar.gz jquery-ui-ed637b04d75e4ebd6ea523f23e6dee7f64b68145.zip |
Widget: Make contextless widget construction work
Due to the fact the widget factory code is now in strict mode, the check for
being called without using the `new` keyword started breaking if you save the
widget constructor to a variable before calling it:
```js
var customWidget = $.custom.customWidget;
customWidget( {}, elem );
```
as then `this` is undefined and checking for `this._createWidget` crashes.
Account for that with an additional check.
Fixes gh-2015
Closes gh-2019
Diffstat (limited to 'Gruntfile.js')
0 files changed, 0 insertions, 0 deletions