Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Helvik committed Oct 21, 2019
1 parent f05fc41 commit 1f6fdc1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@adrianhelvik/vdom",
"version": "1.1.2",
"version": "1.1.3",
"main": "dist/index.js",
"module": "src/index.js",
"author": "Adrian Helvik <adrian.helvik@specifique.no>",
Expand Down
2 changes: 1 addition & 1 deletion src/createNode.js
Expand Up @@ -23,7 +23,7 @@ export default function createNode(virtualNode, pendingComponents) {
}

if (typeof virtualNode === 'object' && virtualNode.type === undefined) {
throw Error('Pass null, and not undefined to create empty nodes')
throw Error(`Invalid virtual node type: ${typeof virtualNode.type}`)
}

const node =
Expand Down
2 changes: 1 addition & 1 deletion src/createNode.spec.js
Expand Up @@ -7,7 +7,7 @@ it('creates an empty fragment if the value is null', () => {

it('throws if the value is undefined', () => {
expect(() => createNode({ type: undefined }, [])).toThrow(
'Pass null, and not undefined to create empty nodes',
'Invalid virtual node type: undefined',
)
})

Expand Down

0 comments on commit 1f6fdc1

Please sign in to comment.