Skip to content

Commit bfdd40e

Browse files
committed
Fix - VueUiChord - Fix skeleton not showing when dataset prop is missing
1 parent 61bc7b6 commit bfdd40e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/vue-ui-chord.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ function prepareChart() {
200200
}
201201
202202
function checkDataset(){
203-
if (props.dataset.matrix.length < 2) {
203+
if (!props.dataset || !Object.hasOwn(props.dataset, 'matrix') || props.dataset.matrix.length < 2) {
204204
console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:\n\nmatrix:[\n [1, 1],\n [1, 1]\n]`);
205205
isDataset.value = false;
206+
return;
206207
}
207208
208209
props.dataset.matrix.forEach((m, i) => {

0 commit comments

Comments
 (0)