-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
isAbortSignal and isBlob use constructor.name only to check.
However, constructor.name can be rewrited. So, for example, webpack4 with production mode will break constructor.name of AbortSignal that will be rewritten to "s".
So, Expected signal to be an instanceof AbortSignal Error was occured (ref: yumetodo/vscode-google-photos-uploader#11 )
isURLSearchParams is adopting good implementation (ref: #296 (comment), 302992d ). Object.prototype.toString() will call Symbol.toStringTag propaty which is not writable(see MDN)
Of course, I know that there are two workarounds for webpack4:
- Set
optimization.minimizetofalse(ref: function constructor name changed after bundled as a library webpack/webpack#6841 (comment)) - Specify minimizer manually and set
keep_fnamestotrue(ref: Keep function names in build for production mode CartoDB/carto-vl#1066)
However, rely on constructor.name is a bad idea, I think.
