Errors will occur before we detect v2, make sure those don't get sent.
This commit is contained in:
parent
be934756d4
commit
afe98d2425
@ -318,13 +318,13 @@ Main =
|
|||||||
|
|
||||||
errors: []
|
errors: []
|
||||||
logError: (data) ->
|
logError: (data) ->
|
||||||
return if Main.v2Detected
|
|
||||||
unless Main.errors.length
|
unless Main.errors.length
|
||||||
$.on window, 'unload', Main.postErrors
|
$.on window, 'unload', Main.postErrors
|
||||||
c.error data.message, data.error.stack
|
c.error data.message, data.error.stack
|
||||||
Main.errors.push data
|
Main.errors.push data
|
||||||
|
|
||||||
postErrors: ->
|
postErrors: ->
|
||||||
|
return if Main.v2Detected
|
||||||
errors = Main.errors.map (d) -> d.message + ' ' + d.error.stack
|
errors = Main.errors.map (d) -> d.message + ' ' + d.error.stack
|
||||||
$.ajax '<%= meta.page %>errors', {},
|
$.ajax '<%= meta.page %>errors', {},
|
||||||
sync: true
|
sync: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user