8000 Issue after Preact Build "Uncaught TypeError: (intermediate value) is not iterable" · Issue #146 · storeon/storeon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue after Preact Build "Uncaught TypeError: (intermediate value) is not iterable" #146

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

Open
sutharm opened this issue Oct 11, 2021 · 3 comments

Comments

@sutharm
Copy link
sutharm commented Oct 11, 2021

I am getting the following error after Preact build.

"Uncaught TypeError: (intermediate value) is not iterable" on following code line number 2

`import { createStoreon } from 'storeon'
let count = store => {
  store.on('@init', () => ({ page: [],misc: [], category:[], filters:[],product:[] }))
  

  store.on('filters', ({ filters }, filter1) => ( {filters: {...filters, ...filter1}}));


  store.on('category', ({ category }, val) => {
    return {
      category: { ...category, [val.url]: {...category[val.url], ...val.payload} }
    }
  })

  store.on('product', ({ product }, val) => {
    return {
      product: { ...product, [val.url]: {...product[val.url], ...val.payload} }
    }
  })

  store.on('page', ({ page }, val) => {
    return {
      page: { ...page, [val.url]: {...page[val.url], ...val.payload} }
    }
  })

  store.on('Rproduct', ({ product }, val) => {
    return {
      product: { ...product, [val.url]: null }
    }
  })

  store.on('misc', ({ misc }, val) => {
    return {
      misc: { ...misc, [val.type]: val.payload }
    }
  })



}
  


export const store = createStoreon([...count, 
  //process.env.NODE_ENV !== 'production' && storeonLogger
])
@ai
Copy link
Member
ai commented Oct 11, 2021

We are only accepting PR for Storeon.

My new state manager is Nano Stores https://github.com/nanostores/nanostores

@sutharm
Copy link
Author
sutharm commented Oct 11, 2021

Will update with nano stores later. Can you please suggest a fix for this issue?

@ai
Copy link
Member
ai commented Oct 11, 2021

I never saw this issue before.

At least, we need full stacktrace.

But very likely that this issue is a part of your environment, and only you can debug it.

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
0