openreplay/frontend/app/dev/components/EvalErrorBtn.js
2021-05-01 15:12:01 +05:30

16 lines
No EOL
291 B
JavaScript

import React from 'react';
function throwEvalError() {
eval('var a = [];a[100].doSomething()');
}
export default function EvalErrorBtn() {
return (
<button
onClick={throwEvalError}
style={{background:'teal', color: 'white' }}
>
{"Make Eval Error"}
</button>
);
}