PolymerElements / iron-ajax

Easily make ajax requests
https://www.webcomponents.org/element/PolymerElements/iron-ajax
127 stars 113 forks source link

[Polymer 2] verbose + error #296

Open robrez opened 7 years ago

robrez commented 7 years ago

Description

In a polymer 2.0 app, iron-ajax is generating an exception in its error handler whenever verbose is true:

Uncaught (in promise) TypeError: undefined is not a function
    at HTMLElement._logger (legacy-element-mixin.html:896)
    at HTMLElement._error (legacy-element-mixin.html:924)
    at HTMLElement._handleError (iron-ajax.html:526)
    at <anonymous>

The stack trace takes me to this line: https://github.com/PolymerElements/iron-ajax/blob/master/iron-ajax.html#L526

However, the console shows that the error function exists, so I'm not quite sure what is going wrong

> Polymer.Base._error

function _error(...args) {
        this._logger('error', args)
      }

The exception is not generated whenever I remove the verbose property