Assuming global variable exists #1

Open
opened 2022-10-29 16:10:15 +00:00 by Ghost · 0 comments

Your program assumes that the global variable exists, which it may not.

Please change if (global.localStorage) { to if (global && global.localStorage) { so apps that use this don't crash.

Your program assumes that the global variable exists, which it may not. Please change `if (global.localStorage) {` to `if (global && global.localStorage) {` so apps that use this don't crash.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coolaj86/local-storage.js#1
No description provided.