File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 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 {
8181 this . logMessage ( args , LoggerLevel . INFO ) ;
8282 }
8383
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+
8493 debug ( ...args : any [ ] ) : void {
8594 const encodedArgs : string [ ] = this . getPasswordEncodedArguments ( args ) ;
8695 this . logMessage ( encodedArgs , LoggerLevel . DEBUG ) ;
@@ -159,7 +168,8 @@ export class Logger implements ILogger {
159168 const result : any = { } ;
160169 const cleanedData = _ . cloneDeep ( data ) ;
161170
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" ) ;
163173
164174 for ( const element of dataToCheck ) {
165175 if ( opts . length === 0 ) {
You can’t perform that action at this time.
0 commit comments