Skip to content

Commit

Permalink
Add some feature detection for older browsers. See #1608.
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisCatus committed Aug 27, 2018
1 parent fdde592 commit eb6aeb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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...)
Expand Down
2 changes: 1 addition & 1 deletion omega-web/src/coffee/log_error.coffee
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit eb6aeb0

Please sign in to comment.