Angular-Slickgrid: Polyfills ERROR TypeError: Function.prototype.toString requires that 'this' be a Function at Boolean.toString ()
Describe the bug
I am trying to load a basic grid. But its showing the following error.
ERROR TypeError: Function.prototype.toString requires that ‘this’ be a Function at Boolean.toString (<anonymous>) at Boolean.f (polyfills.83bf772aef6d3363.js:1:19862) at A.isPlainObject (9183.30ab7e6c5644b258.js:1:97553) at A.extend (9183.30ab7e6c5644b258.js:1:98017) at ae.mergeGridOptions (9183.30ab7e6c5644b258.js:1:884921) at ae.initialization (9183.30ab7e6c5644b258.js:1:868204) at ae.ngAfterViewInit (9183.30ab7e6c5644b258.js:1:865534) at Gf (main.8220ccfd1ba21023.js:1:262994) at Lm (main.8220ccfd1ba21023.js:1:263141) at Zu (main.8220ccfd1ba21023.js:1:262899) handleError @ main.8220ccfd1ba21023.js:1
Reproduction
Source code everything working fine. Publish the source and upload to AWS hosting or similar.
Expectation
There should not be any errors. It should display the grid.
Environment Info
angular 17.0.7
Angular Slickgrid 7.0.3
TypeScript 5.2.2
Browser Chrome, Mozilla
Validations
- Follow our Code of Conduct
- Read the HOWTO - Quick Start.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 25 (13 by maintainers)
Commits related to this issue
- fix: don't use `Boolean()` for compatibility - I'm not sure if it's related or not but this Angular-Slickgrid issue came up with this error so I wonder if this could help to use older code that is mor... — committed to ghiscoding/multiple-select-vanilla by ghiscoding 6 months ago
- feat(utils): replace slick-core extend utils with `node-extend` the `extend` function that was added to SlickGrid core utils seems to be causing problems when Angular-Slickgrid are published on extern... — committed to ghiscoding/slickgrid-universal by ghiscoding 6 months ago
- feat(utils): replace slick-core extend utils with `node-extend` (#1277) * feat(utils): replace slick-core extend utils with `node-extend` the `extend` function that was added to SlickGrid core utils... — committed to ghiscoding/slickgrid-universal by ghiscoding 6 months ago
- feat: reimplement highlight row, node-extend also fixes #1332, #1333 - fixes #1332, #1333 - possibly (and hopefully) fixes #1334 by using the new reimplementation of node-extend that is used for mergi... — committed to ghiscoding/Angular-Slickgrid by ghiscoding 6 months ago
Yes, it worked well. Thank you so much for your support.
looking back at the provided AWS website, it seems that the reimplementation of
node-extendseems to have fixed your issue, finally 🎉 The other user also confirmed that it works now, so I guess we’re all good nowI remembered that I recently started using
Boolean(...)in themultiple-select-vanillalibrary and sinceBoolean()with.toString()shows up in your error, I decided to revert that code in there and use something that is probably more compatible (see PR ref shown above). I just published a patch version ofmultiple-select-vanillaat version1.1.2. You could try to update it on your end, this might be the cause of your issue (I guess deleting your lock file would probably download the latest version).For the SlickGrid libs, I’m only expecting to release another version them in a day or two, so up to you if you want to wait or give it a try earlier, there’s a good chance that it would be related since that is the only place I found to be using the
Boolean()syntax (and I probably won’t anymore since that seems like an issue)