[
https://issues.apache.org/jira/browse/CB-8023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14213715#comment-14213715
]
Patrick Mueller commented on CB-8023:
-------------------------------------
Ya, in Chrome, I'm seeing {{"Uncaught TypeError: Cannot read property
'toString' of undefined"}}.
I've just pushed a fix here, on master:
https://git-wip-us.apache.org/repos/asf?p=cordova-weinre.git;a=blobdiff;f=weinre.web/modules/weinre/target/Console.coffee;h=aec70be9b1a95191e622ad12120e705aeb958d98;hp=cf6624a7e461b873f8c1ef21157d721c2c830bcf;hb=04ba61d963c7f1774b4bff5d7eb3a5772e3f7088;hpb=707a7a1bf56269c5cd4b3fa53a3d6ab5b6ba69ab
Basically, a pre-check of the messageParts parm to make sure it's not null or
an empty array:
{{return if !messageParts?.length}}
I'll need to spin a new build, and test it, before releasing a new version.
Thanks for the report! Sorry for your troubles.
> weinre console.log fails when given null value
> ----------------------------------------------
>
> Key: CB-8023
> URL: https://issues.apache.org/jira/browse/CB-8023
> Project: Apache Cordova
> Issue Type: Bug
> Components: weinre
> Reporter: Kevin Turner
> Assignee: Patrick Mueller
> Labels: easyfix, easytest
>
> weinre's Console._generic, through which all console.log messages go,
> contains this line:
> https://github.com/apache/cordova-weinre/blob/f8bcc48f84d9d08f04993328124a62b6bc5026c4/weinre.web/modules/weinre/target/Console.coffee#L78
> message = messageParts[0].toString()
> When messageParts[0] is null, that fails with "null is not an object" (on
> cordova on iOS, other browsers may have different messages but also may not
> have a toString on null).
> It's a small mistake but terrifically annoying to track down such a crash
> introduced by this debugging tool.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]