File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,15 @@ export class Logger implements ILogger {
81
81
this . logMessage ( args , LoggerLevel . INFO ) ;
82
82
}
83
83
84
+ /**
85
+ * DEPRECATED
86
+ * Present only for backwards compatibility as some plugins (nativescript-plugin-firebase)
87
+ * use $logger.out in their hooks
88
+ */
89
+ out ( ...args : any [ ] ) : void {
90
+ this . info ( args ) ;
91
+ }
92
+
84
93
debug ( ...args : any [ ] ) : void {
85
94
const encodedArgs : string [ ] = this . getPasswordEncodedArguments ( args ) ;
86
95
this . logMessage ( encodedArgs , LoggerLevel . DEBUG ) ;
@@ -159,7 +168,8 @@ export class Logger implements ILogger {
159
168
const result : any = { } ;
160
169
const cleanedData = _ . cloneDeep ( data ) ;
161
170
162
- const dataToCheck = data . filter ( el => typeof el === "object" ) ;
171
+ // objects created with Object.create(null) do not have `hasOwnProperty` function
172
+ const dataToCheck = data . filter ( el => typeof el === "object" && el . hasOwnProperty && typeof el . hasOwnProperty === "function" ) ;
163
173
164
174
for ( const element of dataToCheck ) {
165
175
if ( opts . length === 0 ) {
You can’t perform that action at this time.
0 commit comments