Răsfoiți Sursa

Merge branch 'feature/chrome-31'

FelisCatus 7 ani în urmă
părinte
comite
f338664e5c

+ 2 - 2
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...)

+ 1 - 1
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"