Skip to content

post或put 时,data若为{id:1,name:null} 这种带null值的对象,会报错Cannot convert undefined or null to object #7

Description

@rockerneos

defaults.headers.put['Content-Type'] = 'application/json'

Cannot convert undefined or null to object;
TypeError: Cannot convert undefined or null to object
at t.getOwnPropertyNames ()
at t.isEmptyObject

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions