mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-13 00:28:42 +08:00
Attatch window.eval code to the reported error
So I can see what was attempted
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user