Skip to content

Commit

Permalink
Update for changes in @types/unist
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 18, 2021
1 parent ba8c8d6 commit 1e875fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export var u = /**
}

if (Array.isArray(value)) {
// @ts-expect-error: create a parent.
node.children = value
} else if (value !== undefined && value !== null) {
// @ts-expect-error: create a literal.
node.value = String(value)
}

Expand Down

0 comments on commit 1e875fd

Please sign in to comment.