1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

Fix console.error references

Microsoft edge does not support console.error.bind, nor is that call necessary here.
This commit is contained in:
Dan Finlay 2016-08-29 17:32:39 -07:00
parent 6838027c65
commit b36b760338

View File

@ -324,13 +324,13 @@ window.LiveReloadOptions = { host: 'localhost' };
this.pluginIdentifiers = {}
this.console = this.window.console && this.window.console.log && this.window.console.error ? this.window.location.href.match(/LR-verbose/) ? this.window.console : {
log: function () {},
error: this.window.console.error.bind(this.window.console),
error: console.error,
} : {
log: function () {},
error: function () {},
}
if (!(this.WebSocket = this.window.WebSocket || this.window.MozWebSocket)) {
this.console.error('LiveReload disabled because the browser does not seem to support web sockets')
console.error('LiveReload disabled because the browser does not seem to support web sockets')
return
}
if ('LiveReloadOptions' in window) {
@ -344,7 +344,7 @@ window.LiveReloadOptions = { host: 'localhost' };
} else {
this.options = Options.extract(this.window.document)
if (!this.options) {
this.console.error('LiveReload disabled because it could not find its own <SCRIPT> tag')
console.error('LiveReload disabled because it could not find its own <SCRIPT> tag')
return
}
}