Skip to content

Commit 7fc9f64

Browse files
committed
Fixed a bug where errors could be thrown while attempting to marshal a string using heuristics.
1 parent c792663 commit 7fc9f64

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ The marshalled version of the input data.
5252

5353
## Changelog:
5454

55+
**v1.0.5**:
56+
57+
- Fixed a bug where errors could be thrown while attempting to marshal a string using heuristics.
58+
5559
**v1.0.3**:
5660

5761
- Added marshalling to/from `symbol`.

src/Marshaller.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,6 @@ export class Marshaller implements IMarshaller {
633633
return toNum;
634634
}
635635

636-
// It might be an array
637-
if (primitive.startsWith("[") && primitive.endsWith("]")) return JSON.parse(primitive);
638-
639636
if (data === "null") return null;
640637
if (data === "undefined") return undefined;
641638
if (data === "NaN") return NaN;

0 commit comments

Comments
 (0)