File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,9 @@ export namespace OneSignal {
440440
441441 // forces values to be string types
442442 if ( typeof value !== 'string' ) {
443+ console . warn (
444+ 'OneSignal: addTag: tag value must be of type string; attempting to convert'
445+ ) ;
443446 value = String ( value ) ;
444447 }
445448
@@ -463,8 +466,12 @@ export namespace OneSignal {
463466
464467 const convertedTags = tags as { [ key : string ] : any } ;
465468 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+ }
468475 } ) ;
469476
470477 RNOneSignal . addTags ( tags ) ;
You can’t perform that action at this time.
0 commit comments