forked from MapComplete/MapComplete
Improve error message
This commit is contained in:
parent
0a1d0744f7
commit
559a129d8d
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,9 @@ export default class DependencyCalculator {
|
||||||
const preset = layer.presets[i]
|
const preset = layer.presets[i]
|
||||||
const snapTo = preset.preciseInput?.snapToLayers
|
const snapTo = preset.preciseInput?.snapToLayers
|
||||||
if (snapTo && !Array.isArray(snapTo)) {
|
if (snapTo && !Array.isArray(snapTo)) {
|
||||||
throw new Error("snapToLayers is not an array; it is " + snapTo)
|
throw new Error(
|
||||||
|
`snapToLayers is not an array; it is ${snapTo}(used in preset ${i} for: ${layer.id})`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
preset.preciseInput?.snapToLayers?.forEach((id) => {
|
preset.preciseInput?.snapToLayers?.forEach((id) => {
|
||||||
deps.push({
|
deps.push({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue