Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# example.js spec folder
/spec
2 changes: 1 addition & 1 deletion builder.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class HyperdispatchNamespace {

module.exports = class Hyperdispatch {
constructor (schema, dispatchJson, { offset, dispatchDir = null, schemaDir = null } = {}) {
if (dispatchJson && dispatchJson.offset !== offset) {
if (dispatchJson && offset && dispatchJson.offset !== offset) {
throw new Error('Cannot change the hyperdispatch offset once it has been defined once')
}
this.schema = schema
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
}
},
"scripts": {
"test": "standard && brittle test/index.js"
"test": "standard && brittle test/index.js && npm run example:rebuild",
"example:rebuild": "node example.js && node example.js"
},
"repository": {
"type": "git",
Expand Down
Loading