1
0
Fork 0

chore(core): Fixed linter warnings

This commit is contained in:
Joost De Cock 2020-08-23 17:09:09 +02:00
parent 308fd6afa3
commit 9125b49841
3 changed files with 3 additions and 4 deletions

View file

@ -227,11 +227,11 @@ Part.prototype.shorthand = function () {
self.context.raise.warning(
`\`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(
`\`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(
`\`points.${name}\` was set with a \`y\` parameter that is not a \`number\``
)

View file

@ -1,4 +1,4 @@
import { macroName, round, sampleStyle, capitalize } from './utils'
import { macroName, sampleStyle, capitalize } from './utils'
import Part from './part'
import Point from './point'
import Path from './path'

View file

@ -1,5 +1,4 @@
import Attributes from './attributes'
import Point from './point'
function Snippet(def, anchor, debug = false) {
this.def = def