You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The easiest workaround I found was to directly import the .svelte file. Change: import SvelteTable from "svelte-table";
to import SvelteTable from "svelte-table/src/SvelteTable.svelte";
This gets around the use of the dist/ folder versions in the NPM package.
Here's where you can hack the dist/es/SvelteTable.mjs file to confirm:
function Y(t, n, c, s, r, a, i, d = [-1]) {
const u = O;
S(t);
const f = t.$$ = {
fragment: null,
ctx: null,
props: a,
update: e,
not_equal: r,
bound: o(),
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(n.context || (u ? u.$$.context : [])),
callbacks: o(),
dirty: d,
skip_bound: !1,
root: n.target || (u && u.$$.root)
};
SvelteTable.mjs:404
Uncaught TypeError: Cannot read properties of undefined (reading '$$')
at Y (SvelteTable.mjs:404)
at new Ce (SvelteTable.mjs:1411)
at Array.create_default_slot_13 (Board.svelte:138)
at create_slot (index.mjs:141)
at create_fragment (CardBody.svelte:2)
at init (index.mjs:2129)
at new CardBody (CardBody.svelte:7)
at Array.create_default_slot_12 (Board.svelte:138)
at create_slot (index.mjs:141)
at create_fragment (Card.svelte:2)
The text was updated successfully, but these errors were encountered:
I'm not sure if there is any trade-off in using the distribution version, compared to the .svelte component directly. I guess if you leave it 'as is' then it's up to the developer to switch versions when they are ready to do so.
Of course, if you revert back to 3.38.0 then any new adopters of the svelte-table control won't strike this issue upfront. It might be dependant on different scenarios though... I was using WebPack (on RoR - the svelte-rails gem) with NodeJS 14 (which uses .mjs) where as users on SvelteKit / rollup may not experience this problem. (I'm not sure specifically why I'm the first person to encounter this issue 😉 )
The distribution versions of
svelte-table
are compiled withsvelte
>3.39.0
which has this issue:sveltejs/svelte#6584
Introduced here: sveltejs/svelte#5870
The easiest workaround I found was to directly import the
.svelte
file. Change:import SvelteTable from "svelte-table";
to
import SvelteTable from "svelte-table/src/SvelteTable.svelte";
This gets around the use of the
dist/
folder versions in the NPM package.Here's where you can hack the
dist/es/SvelteTable.mjs
file to confirm:... to add
u && u.$$.root
. This is be theparent_component
pointer is not checked - see sveltejs/svelte@5cfefeb#diff-da9bae4e28c441de5ba3a074e30775fe69109100b3d921ad8f2592d93cd67b7fR133.The error is:
The text was updated successfully, but these errors were encountered: