Attatch window.eval code to the reported error

So I can see what was attempted
This commit is contained in:
Bruno Lemos
2019-01-19 19:57:23 -02:00
parent f69e556d24
commit e875ed64be

View File

@@ -1,6 +1,9 @@
// Security precaution
;(window as any).eval = global.eval = () => {
throw new Error(`This app does not allow window.eval().`)
;(window as any).eval = global.eval = (payload: string) => {
const error = new Error(`This app does not allow window.eval().`)
Object.assign(error, { payload })
throw error
}
import '@babel/polyfill'