File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,9 @@ export namespace OneSignal {
440
440
441
441
// forces values to be string types
442
442
if ( typeof value !== 'string' ) {
443
+ console . warn (
444
+ 'OneSignal: addTag: tag value must be of type string; attempting to convert'
445
+ ) ;
443
446
value = String ( value ) ;
444
447
}
445
448
@@ -463,8 +466,12 @@ export namespace OneSignal {
463
466
464
467
const convertedTags = tags as { [ key : string ] : any } ;
465
468
Object . keys ( tags ) . forEach ( function ( key ) {
466
- // forces values to be string types
467
- convertedTags [ key ] = String ( convertedTags [ key ] ) ;
469
+ if ( typeof convertedTags [ key ] !== 'string' ) {
470
+ console . warn (
471
+ 'OneSignal: addTags: tag value for key ' + key + ' must be of type string; attempting to convert'
472
+ ) ;
473
+ convertedTags [ key ] = String ( convertedTags [ key ] ) ;
474
+ }
468
475
} ) ;
469
476
470
477
RNOneSignal . addTags ( tags ) ;
You can’t perform that action at this time.
0 commit comments