Skip to content

Commit 891ad52

Browse files
committed
+ correctly expose "methods"-option to recover compatibility to vue-class-component
1 parent f60e9d3 commit 891ad52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/option/methodsAndHooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const decorator = optionNullableMemberDecorator(function (proto: any, nam
3232
export function build(cons: Cons, optionBuilder: OptionBuilder) {
3333
const slot = obtainSlot(cons.prototype)
3434
const protoArr = toComponentReverse(cons.prototype)
35-
const hookMap = slot.obtainMap('hooks')
35+
const map = slot.obtainMap('hooks')
3636

3737
optionBuilder.hooks ??= {}
3838
optionBuilder.methods ??= {}
@@ -50,7 +50,7 @@ export function build(cons: Cons, optionBuilder: OptionBuilder) {
5050
return !['watch', 'hooks', 'emits', 'provide'].includes(mapName)
5151
});
5252
names.forEach(name => {
53-
if (HookNames.includes(name) || hookMap.has(name)) {
53+
if (HookNames.includes(name) || map.has(name)) {
5454
HookFunctions[name] = proto[name]
5555
} else {
5656
MethodFunctions[name] = proto[name]

0 commit comments

Comments
 (0)