Skip to content

arrayBuffer is not an instance of ArrayBuffer #26

@TMTHY

Description

@TMTHY

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions