johnnydepp icon indicating copy to clipboard operation
johnnydepp copied to clipboard

done in callbacks and require

Open viT-1 opened this issue 2 years ago • 0 comments

I found surprising me behaviour. If I use depp.done in callback, I can't depp.require it at once: depp.require(['dep1', 'dep1 cb done'], finalCb);. Demo

As a workaround I use two depp.require:

depp.require(['dep1'], function () { depp.require(['dep1 cb done'], finalCb); });

or

depp.require(['dep1'], cb);
depp.require(['dep1 cb done'], finalCb);

viT-1 avatar Feb 27 '23 09:02 viT-1