We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da7c661 commit 01b9482Copy full SHA for 01b9482
src/component.js
@@ -139,10 +139,13 @@ export function enqueueRender(internal) {
139
}
140
141
142
+/** @type {(a: import('./internal').Internal, b: import("./internal").Internal) => number} */
143
+const sortByDepth = (a, b) => a._depth - b._depth;
144
+
145
/** Flush the render queue by rerendering all queued components */
146
function processRenderQueue() {
147
while ((len = processRenderQueue._rerenderCount = renderQueue.length)) {
- renderQueue.sort((a, b) => a._depth - b._depth);
148
+ renderQueue.sort(sortByDepth);
149
while (len--) {
150
renderQueuedInternal(renderQueue.shift());
151
0 commit comments