-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImageData
not stringifying consistently on Node 14.7
#1646
Comments
Sorry, turns out I hadn't successfully switched nvm to Node 14. Am on a very slow/flaky connection, so can't really test Node 14 on the Mac locally again atm, but on Travis, it is giving the same Unfortunately, am not at all familiar with C/C++ (e.g., to see about adding |
ImageData
not stringifying consistently with other envts in Node 14 on LinuxImageData
not stringifying consistently on Node 14.7
I'm on v14.15.5 (through nvm) and still getting the issue. |
@zbjornson : Any chance you'd be free to take a look? |
bump... |
Meant to make a PR but accidentally pushed the fix to master. Will be in the next release. |
@zbjornson : I'm still not seeing this work in the 2.9.1 release. Running |
I think what the issue is in my case is that I am not running get [Symbol.toStringTag] () {
return 'ImageData';
} |
Can you please reopen this? This is not fixed. Note that it is not a toString issue but toStringTag issue. |
Is there anything I can help clarify about this topic to speed it along? This should I think really be a no-brainer as it is consistent with browser behavior and is a minor addition.
|
@brettz9 I've had almost no time for open-source work lately, but I'm happy to review a PR with a test if you want to make one. |
@zbjornson : I've submitted #2214 if you could take a look... Thanks! |
Issue or Feature
In
typeson-registry
, we need to detect object type in order to properly serialize objects for JSON.For some reason, on Node 14 in Linux (Xenial), this is failing, but it is not failing in Node 10 or 12 in Linux, nor in Node 14 on the Mac.This is failing on Node 14.7, but not in Node 10 or 12.In performing some logging, it turns out that calling
Object.prototype.toString.call()
onImageData
objects will give[object Object]
in Node 14.7, but in other environments, as expected, it gives[object ImageData]
.Perhaps this is due to a proper fix in Node 14.7 since objects should only give
[object Object]
unlessSymbol.toStringTag
is used, but in any case, if it is not doing so already, I'd hope your build process could add the equivalent of the following toImageData
to ensure it behaves as in the browser so that one can detect the type of such objects (this approach will, unlikeinstanceof
, also ensure detection continues to work cross-frame when used in polyglot browser code).Steps to Reproduce
Your Environment
npm list canvas
oryarn list canvas
): 2.6.1Thanks!
The text was updated successfully, but these errors were encountered: