Skip to content

Commit 4347ce7

Browse files
fix: Return early if settings string is null
1 parent a9f08d4 commit 4347ce7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Rokt-Kit.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@ function mergeObjects() {
453453
}
454454

455455
function parseSettingsString(settingsString) {
456+
if (!settingsString) {
457+
return [];
458+
}
456459
try {
457460
return JSON.parse(settingsString.replace(/"/g, '"'));
458461
} catch (error) {

0 commit comments

Comments
 (0)