You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, in some browsers (usually old ones), calling untar from GWT client, produces exception "arrayBuffer is not an instance of ArrayBuffer."
In that part of code:
function function untar(arrayBuffer) {
if (!(arrayBuffer instanceof ArrayBuffer)) {
throw new TypeError("arrayBuffer is not an instance of ArrayBuffer.");
}
...
}
Object passed to untar is actually ArrayBuffer, Chrome debugger shows that is ArrayBuffer, but "instanceof ArrayBuffer" returns false. When you remove lines with the type check, everything is working fine.
May be another version on the function can be introduced (untarUnchecked), without type checking?
The text was updated successfully, but these errors were encountered:
A better fix would be to remove the instanceof check and use 🦆 typing instead.
If it has the required methods of an ArrayBuffer, it probably is an ArrayBuffer.
Sometimes, in some browsers (usually old ones), calling untar from GWT client, produces exception "arrayBuffer is not an instance of ArrayBuffer."
In that part of code:
Object passed to untar is actually ArrayBuffer, Chrome debugger shows that is ArrayBuffer, but "instanceof ArrayBuffer" returns false. When you remove lines with the type check, everything is working fine.
May be another version on the function can be introduced (untarUnchecked), without type checking?
The text was updated successfully, but these errors were encountered: