[ 
https://issues.apache.org/jira/browse/CB-11131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15258360#comment-15258360
 ] 

ASF GitHub Bot commented on CB-11131:
-------------------------------------

Github user jasongin commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/431#discussion_r61116509
  
    --- Diff: cordova-common/src/CordovaLogger.js ---
    @@ -209,7 +209,7 @@ function formatError(error, isVerbose) {
             message = error;
         }
     
    -    if(message.toUpperCase().indexOf('ERROR:') !== 0) {
    +    if(message && typeof message.toUpperCase === 'function' && 
message.toUpperCase().indexOf('ERROR:') !== 0) {
    --- End diff --
    
    This is fine, but I would have preferred `if (typeof message === 'string' 
&& message.toUpperCase()...)`


> Fix TypeError: message.toUpperCase is not a function in CordovaLogger
> ---------------------------------------------------------------------
>
>                 Key: CB-11131
>                 URL: https://issues.apache.org/jira/browse/CB-11131
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaCommon
>            Reporter: Sergey Shakhnazarov
>            Assignee: Sergey Shakhnazarov
>
> Such an error occurs if a non-string value is passed to CordovaLogger.log:
> {{TypeError: message.toUpperCase is not a function}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to