Skip to content

Commit

Permalink
fix(ios): console.log does not log properly if it has multiple argume…
Browse files Browse the repository at this point in the history
…nts (#11125)

Fixes TIMOB-27313
  • Loading branch information
vijaysingh-axway authored and sgtcoolguy committed Aug 12, 2019
1 parent 43a9fb9 commit 84c6734
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ JSExportAs(timeLog,
-(void)timeLog
: (id)args withData
: (NSArray *)logData);
JSExportAs(log,
-(void)log
: (id)unused);
@end

// This is a version of the API module which has custom support for log() to
Expand Down
5 changes: 3 additions & 2 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

@implementation TiConsole

- (void)log:(id)level withMessage:(id)args
- (void)log:(id)unused
{
[self info:level];
NSArray *currentArgs = [JSContext currentArguments];
[self logMessage:currentArgs severity:@"info"];
}

- (void)time:(NSString *)label
Expand Down

0 comments on commit 84c6734

Please sign in to comment.