Skip to content

On Safari 10, isFunction fails for window.Proxy #2689

@chabb

Description

@chabb

This is due to the fact that isFunction is defined the following way

function isFunction(value) { // The use of Object#toStringavoids issues with thetypeof operator // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; }

But on Safari 10, when you do Object.prototype.toString.call(window.Proxy)
you get "[object Proxy]", which is not equals to funcTag, nor genTag

Note that typeOf seems to work fine on Safari 10 BUT i have not tried on all type of objects

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions