Skip to content

Commit ba28dca

Browse files
authored
Merge pull request #44 from Shaxine/unused-hooks
Fix error when hook is unused
2 parents 1f9bdb1 + 3f4d645 commit ba28dca

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ export default {
5757
computed: {
5858
extensions () {
5959
// console.log(`hook ${this.hook}: `, hookRegistry[this.hook])
60+
if (hookRegistry[this.hook] === undefined) {
61+
return null
62+
}
6063
return hookRegistry[this.hook].sort((obj1, obj2) => {
6164
return obj1.weight - obj2.weight
6265
})

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-extensions",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"license": "MIT",
55
"author": "Christian González <[email protected]>",
66
"scripts": {

0 commit comments

Comments
 (0)