Skip to content

Commit

Permalink
Merge pull request #2 from randlabs/parse_null_fix
Browse files Browse the repository at this point in the history
Fix null value parsing
  • Loading branch information
Alex99y authored Mar 27, 2021
2 parents 44d2989 + 5eeeeb1 commit 3bd4e07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@randlabs/json-bigint",
"version": "1.0.1",
"version": "1.0.2",
"description": "JSON library with BigInt support",
"main": "dist/json-bigint.js",
"browser": "dist/json-bigint.min.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class JSONBigInt {
// Private methods

private static convertToBigInt(obj: any, tag: string): any {
if (typeof obj === 'object') {
if (obj && typeof obj === 'object' && (!Array.isArray(obj))) {
const keys = Object.keys(obj);

if (keys.length == 1 && keys[0] == tag) {
Expand Down

0 comments on commit 3bd4e07

Please sign in to comment.