Skip to content

Commit 9316b9d

Browse files
rgomezpjkasten2
authored andcommitted
Check for boolean instead of not string
1 parent 8bcfdde commit 9316b9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export default class OneSignal {
236236
static sendTag(key, value) {
237237
if (!checkIfInitialized()) return;
238238

239-
if (typeof value !== "string") {
239+
if (typeof value === "boolean") {
240240
value = JSON.stringify(value);
241241
}
242242

@@ -247,7 +247,7 @@ export default class OneSignal {
247247
if (!checkIfInitialized()) return;
248248

249249
Object.keys(tags).forEach((key)=>{
250-
if (typeof tags[key] !== "string"){
250+
if (typeof tags[key] === "boolean"){
251251
tags[key] = JSON.stringify(tags[key]);
252252
}
253253
})

0 commit comments

Comments
 (0)