Open virtueer opened 3 years ago
https://github.com/dilame/instagram-private-api/blob/8e2a5aa83cbd93e268cfdcb5ca9148a29e787afb/src/core/request.ts#L199
When i save state, the euDCEnabled comes null and this code trying to "null.toString()". and app gives me TypeError
i changed the code to (typeof this.client.state.euDCEnabled === 'undefined' || this.client.state.euDCEnabled === null) ? void 0 : this.client.state.euDCEnabled.toString(),
(typeof this.client.state.euDCEnabled === 'undefined' || this.client.state.euDCEnabled === null) ? void 0 : this.client.state.euDCEnabled.toString(),
its worked.
You may also use this.client.state.euDCEnabled?.toString(). This does the same and is more compact.
this.client.state.euDCEnabled?.toString()
https://github.com/dilame/instagram-private-api/blob/8e2a5aa83cbd93e268cfdcb5ca9148a29e787afb/src/core/request.ts#L199
When i save state, the euDCEnabled comes null and this code trying to "null.toString()". and app gives me TypeError
i changed the code to
(typeof this.client.state.euDCEnabled === 'undefined' || this.client.state.euDCEnabled === null) ? void 0 : this.client.state.euDCEnabled.toString(),
its worked.