1
0
Fork 0

fix(breanna): Eliminate warning messages when there is no secondary dart

This commit is contained in:
Benjamin F 2022-12-05 06:51:47 -08:00
parent f2bdb43270
commit 9ba0214fbf

View file

@ -84,27 +84,39 @@ export function getDartLocationsAsNumbers(options) {
else return [loc1, loc2]
}
export const getDartPaths = (Path, points) => [
export const getDartPaths = (Path, points) => {
let dart_paths = [
new Path()
.line(points.primaryBustDart1)
.line(points.primaryBustDartTip)
.line(points.primaryBustDart2),
]
if ('secondaryBustDart1' in points)
dart_paths.push(
new Path()
.line(points.secondaryBustDart1)
.line(points.secondaryBustDartTip)
.line(points.secondaryBustDart2),
]
.line(points.secondaryBustDart2)
)
return dart_paths
}
export const getSaDartPaths = (Path, points) => [
export const getSaDartPaths = (Path, points) => {
let dart_paths = [
new Path()
.line(points.primaryBustDart1)
.line(points.primaryBustDartEdge)
.line(points.primaryBustDart2),
]
if ('secondaryBustDart1' in points)
dart_paths.push(
new Path()
.line(points.secondaryBustDart1)
.line(points.secondaryBustDartEdge)
.line(points.secondaryBustDart2),
]
.line(points.secondaryBustDart2)
)
return dart_paths
}
/*
* Once the front is constructed with the theorethical bust darts, we