Hi,
I make an Insert into a collection on my $w.onReady(function ()
I want the insert to happen only once so i'm using the rendering API
I've tried with
if(wixWindow.rendering.env === "browser")
but it still inserts my row twice (most of the time)
and I also tried with
if (wixWindow.rendering.renderCycle === 1)
sometimes it added the row twice and sometimes it didn't add it at all
Any suggestions?
Hello
I also suffered from this issue.
I added the following code:
$w.onReady(() => { console.log(wixWindow.rendering.env); console.log(wixWindow.rendering.renderCycle); });
As you can see in the attached image, it happens twice no matter what.
Also according some place I ready the "renderCycle " is obsolete!
Why do I get "browser" twice??
How can it be resolved that the action will happen only once??
Thanks!
Please post your code or the editor link to your site so we can inspect.