Skip to content

Commit

Permalink
Move a warning so it can be displayed before crash
Browse files Browse the repository at this point in the history
Fixes #28
  • Loading branch information
angiehjort authored Oct 28, 2020
1 parent 5e6fa9f commit 61f6700
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/core/dataConfig/dataConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,14 @@ export function dataConfig(config = {}, parent) {
}

space = space || defaults.space;

if (!space)
console.warn("Could not resolve space concepts for marker", this.parent, { space });

encodings = this.resolveEncodingConcepts(space, this.parent.encoding);

if (!space || !encodings)
console.warn("Could not resolve space or encoding concepts for marker.", this.parent, { space, encodings });
if (!encodings)
console.warn("Could not resolve encoding concepts for marker", this.parent, { encodings });

return { space, encodings };
},
Expand Down Expand Up @@ -260,4 +264,4 @@ export function dataConfig(config = {}, parent) {
return query;
},
};
}
}

0 comments on commit 61f6700

Please sign in to comment.