Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Uncaught TypeError: undefined is not a function" in <MoveResize cols={getComputedCols} #66

Closed
frantic0 opened this issue Dec 14, 2020 · 2 comments

Comments

@frantic0
Copy link

frantic0 commented Dec 14, 2020

Hi @vaheqelyan

I am trying to update to svelte-grid v.3.5.1. I've found your issue #54 and am upgrading accordingly (refactoring grid-items, breakpoints to cols, etc).

However, there is a runtime an error preventing svelte-grid from loading, even without any items.

index.svelte:26 Uncaught (in promise) TypeError: undefined is not a function
    at Object.$$self.$$.update (index.svelte:26)
    at init (index.mjs:1396)
    at new Src (index.svelte:43)

where index.svelte:26 is

<MoveResize ...  
   cols={getComputedCols}

where index.svelte:43 is

  import { debounce, getColumn } from "./utils/other.js";
//line 43
  import MoveResize from "./MoveResize/index.svelte";

so getComputedCols is undefined on load.

Do you have any suggestion on how I can fix this?

Many thanks

@vaheqelyan
Copy link
Owner

Can I see your full stack trace ? it won't be easy for me to tell what's wrong with the component.
https://github.com/vaheqelyan/svelte-grid/blob/master/src/index.svelte#L105 have you provided breakpoints ?

@frantic0
Copy link
Author

oh no, I found that it was the old gap parameter value that was causing a type error (integer rather than a list)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants