diff --git a/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee b/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee index eb60866a..cfccc4e6 100644 --- a/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee +++ b/omega-target-chromium-extension/src/module/proxy/proxy_impl_listener.coffee @@ -1,11 +1,11 @@ OmegaTarget = require('omega-target') # The browser only accepts native promises as onRequest return values. # DO NOT USE Bluebird Promises here! -NativePromise = Promise +NativePromise = Promise ? null ProxyImpl = require('./proxy_impl') class ListenerProxyImpl extends ProxyImpl - @isSupported: -> browser?.proxy?.onRequest? + @isSupported: -> Promise? and browser?.proxy?.onRequest? features: ['fullUrl', 'socks5Auth'] constructor: -> super(arguments...) diff --git a/omega-web/src/coffee/log_error.coffee b/omega-web/src/coffee/log_error.coffee index 056f11cb..a58bd9f4 100644 --- a/omega-web/src/coffee/log_error.coffee +++ b/omega-web/src/coffee/log_error.coffee @@ -1,6 +1,6 @@ window.onerror = (message, url, line, col, err) -> log = localStorage['log'] || '' - if err.stack + if err?.stack log += err.stack + '\n\n' else log += "#{url}:#{line}:#{col}:\t#{message}\n\n"