Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(table-group) 💥 breaks on null children#977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
yogithesymbian wants to merge1 commit intoxaksis:master
base:master
Choose a base branch
Loading
fromyogithesymbian:yogi/table-group

Conversation

yogithesymbian
Copy link

@yogithesymbianyogithesymbian commentedMay 16, 2025
edited
Loading

✅ This ensures .length is only called on arrays.

case :

main.js:344 TypeError: Cannot read properties of null (reading 'length')    at VueComponent.showEmptySlot (vue-good-table.esm.js:13780:82)

✅ Root Cause
this.paginated[0].children is null or undefined, so accessing .length throws an error.

🧩 Fix 1: Check Your rows Data / santizied the children also works

rows = rows.map(r => ({  ...r,  children: r.children ?? [], // replace null with empty array}));orfunction sanitizeRows(rows) {  return (rows || []).map(row => {    const sanitized = { ...row };    if (row.children === null || row.children === undefined) {      sanitized.children = [];    } else if (Array.isArray(row.children)) {      sanitized.children = sanitizeRows(row.children); // recurse    }    return sanitized;  });}ornever use rows as null . use [ ] instead

🧩 Fix 2: modified dist 😇

✅ This ensures .length is only called on arrays.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@yogithesymbian

[8]ページ先頭

©2009-2025 Movatter.jp