This repository was archived by the owner on Oct 5, 2021. It is now read-only.
This repository was archived by the owner on Oct 5, 2021. It is now read-only.
Make Typewiz robust to errors from .toString() user code #84
Closed
Description
The value.toString()
call below can cause Typewiz to crash, since user code can override .toString()
with arbitrary broken code. I ran into this trying to use the Ant library, for instance—rc-editor-mention overrides the class method Mention.toString.
function getTypeName(value, nest = 0) {
...
if (value instanceof Function) {
let argsStr = value.toString().split('=>')[0];