Skip to content

使用Symbol.toStringTag后,type函数会判断错误 #6

Description

@wyjie
const object1 = {};
object1[Symbol.toStringTag] = 'Array';
console.log(type(object1));  // Array

是否可以去掉47行的if判断,直接使用对象的constructor

if(x.constructor == Object){
        return clsLow;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions