Minified version does not work
kkozlik opened this issue · 2 comments
Expected and Actual Behavior
I am using jquery.fancytree-all[.min].js, but I have observed this with jquery.fancytree-all-deps.min.js too.
When I use jquery.fancytree-all.js file it is working fine, but if I include the minified version I get error: "Uncaught TypeError: Cannot read properties of undefined (reading 'options')"
I think the problem is in following function:
The minified version:
Here you can see there is defined variable e
- same name as the function argument and thus it modify the arguments and this._superApply(arguments),
is supplied with wrong value:
instead of:
Environment
- Browser type and version: chromium
- jQuery and jQuery UI versions: 3.7.1 and 1.14.0
- Fancytree version: 2.38.3
enabled/affected extensions: "glyph", "persist", "table"
Interestingly, when I use minified version from CDN (https://cdn.jsdelivr.net/gh/mar10/fancytree@2/dist/jquery.fancytree-all.min.js) it is working fine. But I have the problem with version distributed via npm.
Silly me! I just noticed I forgot to disable uglify for fancytree in my build process which screwed the minified file. Forget this issue. Fancytree is working great.