Skip to content

Conversation

@panji31
Copy link

@panji31 panji31 commented Oct 26, 2021

instagram-private-api/dist/core/request.js:150

'X-IG-EU-DC-ENABLED': typeof this.client.state.euDCEnabled === 'undefined' ? void 0 : this.client.state.euDCEnabled.toString(),

TypeError: Cannot read property 'toString' of null

@Nerixyz
Copy link
Collaborator

Nerixyz commented Oct 26, 2021

In this case I'd guess we want to treat null values as undefined. Though as I said in #1021, the property should never be null, instead it should only be undefined.

With this in mind, the change should be like this:

typeof this.client.state.euDCEnabled === 'boolean' ? this.client.state.euDCEnabled : void 0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants