Skip to content
Prev Previous commit
Next Next commit
fix: add withinOption guard in define*
  • Loading branch information
ItMaga committed Jan 7, 2023
commit 23354ca6ce1679db6a42e33e74ccefe6e891822e
4 changes: 2 additions & 2 deletions lib/rules/padding-lines-in-component-definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ module.exports = {
)

const withinOption = parseOption(options, OptionKeys.WithinOption)
const propsOption = parseOption(withinOption, 'props')
const propsOption = withinOption && parseOption(withinOption, 'props')
if (!propsOption) return

verify(
Expand All @@ -335,7 +335,7 @@ module.exports = {
)

const withinOption = parseOption(options, OptionKeys.WithinOption)
const emitsOption = parseOption(withinOption, 'emits')
const emitsOption = withinOption && parseOption(withinOption, 'emits')
if (!emitsOption) return

verify(
Expand Down