Commit ce739df
committed
refactor: fix serialization of native functions like number, string
The issue is that serialize-javascript throws a TypeError when trying to serialize native functions (like `Number`, `String`, `Array`, etc.). The fix should detect native built-in constructors and serialize them by their name (e.g., `Number` instead of throwing an error).
Affected files: index.js
Signed-off-by: hieuit095 <139037144+hieuit095@users.noreply.github.com>1 parent df3f1c1 commit ce739df
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
0 commit comments