chore(core): Fixed linter warnings
This commit is contained in:
parent
308fd6afa3
commit
9125b49841
3 changed files with 3 additions and 4 deletions
|
@ -227,11 +227,11 @@ Part.prototype.shorthand = function () {
|
||||||
self.context.raise.warning(
|
self.context.raise.warning(
|
||||||
`\`points.${name}\` was set with a value that is not a \`Point\` object`
|
`\`points.${name}\` was set with a value that is not a \`Point\` object`
|
||||||
)
|
)
|
||||||
if (!utils.isCoord(value.x))
|
if (typeof value.x !== 'undefined' && !utils.isCoord(value.x))
|
||||||
self.context.raise.warning(
|
self.context.raise.warning(
|
||||||
`\`points.${name}\` was set with a \`x\` parameter that is not a \`number\``
|
`\`points.${name}\` was set with a \`x\` parameter that is not a \`number\``
|
||||||
)
|
)
|
||||||
if (!utils.isCoord(value.y))
|
if (typeof value.y !== 'undefined' && !utils.isCoord(value.y))
|
||||||
self.context.raise.warning(
|
self.context.raise.warning(
|
||||||
`\`points.${name}\` was set with a \`y\` parameter that is not a \`number\``
|
`\`points.${name}\` was set with a \`y\` parameter that is not a \`number\``
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { macroName, round, sampleStyle, capitalize } from './utils'
|
import { macroName, sampleStyle, capitalize } from './utils'
|
||||||
import Part from './part'
|
import Part from './part'
|
||||||
import Point from './point'
|
import Point from './point'
|
||||||
import Path from './path'
|
import Path from './path'
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import Attributes from './attributes'
|
import Attributes from './attributes'
|
||||||
import Point from './point'
|
|
||||||
|
|
||||||
function Snippet(def, anchor, debug = false) {
|
function Snippet(def, anchor, debug = false) {
|
||||||
this.def = def
|
this.def = def
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue