No Preview

Amarpreet Singh Bhatia

Posted on 17 May 2021

TypeError: banners.forEach is not a function (Error in NewPage.js)

No Preview

0

59

0

No Preview

Amarpreet Singh Bhatia

Explore more similar Post

2 Comments

Amarpreet Singh Bhatia

17 May 2021

Actually when I leave the banner and product image blank and then click on save, I have this error after that

0
REPLY

Bilal Ullah Khan Bhatia

18 May 2021

so you are saying that when you leave banners and products empty then you got this error but when you select images of banners and products then its fine

0
REPLY

Amarpreet Singh Bhatia

18 May 2021

Yes

0
REPLY

Amarpreet Singh Bhatia

18 May 2021

Just when I leave it blank this error happens

0
REPLY

Bilal Ullah Khan

18 May 2021

Check your variable declaration of banners and products It should be like this:- const[banners,setBannerd]=usestate([]); CHECK YOUR USESTATE HAVE YOU PASSED EMPTY ARRAY OR NOT.

0
REPLY

Amarpreet Singh

20 May 2021

Sorry for replying so late. Actually we have a problem in family. Once it's over I will in touch with you again. Till then please can you wait. Sorry sorry sorry!!!!

0
REPLY

Bilal Ullah Khan

20 May 2021

No problem Take your time.????

0
REPLY

Amarpreet Singh Bhatia

17 May 2021

Can anybody help me solve this please

0
REPLY

Rizwan Khan

23 May 2021

forEach only works with an array. You are getting error because your banners or products is not an array somehow you made a mistake in initializing those variables as array

0
REPLY

Amarpreet Singh Bhatia

27 May 2021

That I am not getting where did I made the mistake. I verified my code with yours but both are same. Can you help me where did I made the mistake. A rough guess may also help. Thank you

0
REPLY