diff --git a/docs/owl.js b/docs/owl.js index 738aa71bd..f04a603fc 100644 --- a/docs/owl.js +++ b/docs/owl.js @@ -2270,6 +2270,12 @@ function collectionsProxyHandler(target, callback, targetRawType) { } let currentNode = null; +function saveCurrent() { + let n = currentNode; + return () => { + currentNode = n; + }; +} function getCurrent() { if (!currentNode) { throw new OwlError("No active component (a hook function should only be called in 'setup')"); @@ -5557,7 +5563,7 @@ function compile(template, options = {}) { } // do not modify manually. This file is generated by the release script. -const version = "2.4.0"; +const version = "2.4.1"; // ----------------------------------------------------------------------------- // Scheduler @@ -5568,6 +5574,7 @@ class Scheduler { this.frame = 0; this.delayedRenders = []; this.cancelledNodes = new Set(); + this.processing = false; this.requestAnimationFrame = Scheduler.requestAnimationFrame; } addFiber(fiber) { @@ -5598,6 +5605,10 @@ class Scheduler { } } processTasks() { + if (this.processing) { + return; + } + this.processing = true; this.frame = 0; for (let node of this.cancelledNodes) { node._destroy(); @@ -5611,6 +5622,7 @@ class Scheduler { this.tasks.delete(task); } } + this.processing = false; } processFiber(fiber) { if (fiber.root !== fiber) { @@ -5686,7 +5698,9 @@ class App extends TemplateSet { if (config.env) { this.env = config.env; } + const restore = saveCurrent(); const node = this.makeNode(Root, props); + restore(); if (config.env) { this.env = env; } @@ -6018,6 +6032,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat export { App, Component, EventBus, OwlError, __info__, batched, blockDom, loadFile, markRaw, markup, mount, onError, onMounted, onPatched, onRendered, onWillDestroy, onWillPatch, onWillRender, onWillStart, onWillUnmount, onWillUpdateProps, reactive, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, validate, validateType, whenReady, xml }; -__info__.date = '2024-09-30T08:49:29.420Z'; -__info__.hash = 'eb2b32a'; +__info__.date = '2024-10-31T09:42:30.824Z'; +__info__.hash = 'b8d09e5'; __info__.url = 'https://github.com/odoo/owl'; diff --git a/package-lock.json b/package-lock.json index da89315f7..dbfa65e00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@odoo/owl", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 75377de62..8ea93e261 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@odoo/owl", - "version": "2.4.0", + "version": "2.4.1", "description": "Odoo Web Library (OWL)", "main": "dist/owl.cjs.js", "module": "dist/owl.es.js", diff --git a/src/version.ts b/src/version.ts index 3b1ce5fe2..11d565540 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ // do not modify manually. This file is generated by the release script. -export const version = "2.4.0"; +export const version = "2.4.1"; diff --git a/tools/release.js b/tools/release.js index c17a6a84f..04292d739 100644 --- a/tools/release.js +++ b/tools/release.js @@ -140,7 +140,6 @@ async function startRelease() { } // --------------------------------------------------------------------------- - log(`Step ${step++}/${STEPS}: Creating the release...`); const relaseResult = await execCommand(`gh release create v${next} dist/*.js dist/*.zip ${draft} -F ${file}`); if (relaseResult !== 0) {