Commit 440b24f
committed
fix(msteams): prevent toPluginJsonValue from crashing on unserializable values
toPluginJsonValue serializes plugin values through JSON.stringify+parse
without a try/catch guard, so BigInt, circular references, or other
unserializable values cause an unhandled TypeError that propagates to
the caller and may tear down the MSTeams plugin runtime.
Wrap the JSON round-trip in try/catch and return the original value
when serialization fails, matching the defensive pattern already used
by toCodeModeJsonSafe.1 parent 756de70 commit 440b24f
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
0 commit comments