Compare commits

...

2 Commits

Author SHA1 Message Date
Géry Debongnie 307b936d01 [REL] v1.4.8
# v1.4.8

- fix: prevent crash in some rare cases
2021-11-03 13:44:46 +01:00
Achraf (abz) 6950f8e628 [FIX] components/fiber: Call patch only if target is valid
Currently in some cases, adding an attachment via lognote creates a traceback.
Error : shouldPatch is true while `vnode` is not defined, so `patch()` failed
This is a hotfix correcting this problem by calling `patch()` only if `shouldPatch` is true **and** the `vnode` is set.

opw-2645203
2021-11-03 11:37:04 +01:00
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ npm install @odoo/owl
If you want to use a simple `<script>` tag, the last release can be downloaded here: If you want to use a simple `<script>` tag, the last release can be downloaded here:
- [owl-1.4.7](https://github.com/odoo/owl/releases/tag/v1.4.7) - [owl-1.4.8](https://github.com/odoo/owl/releases/tag/v1.4.8)
## License ## License
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@odoo/owl", "name": "@odoo/owl",
"version": "1.4.7", "version": "1.4.8",
"description": "Odoo Web Library (OWL)", "description": "Odoo Web Library (OWL)",
"main": "dist/owl.cjs.js", "main": "dist/owl.cjs.js",
"browser": "dist/owl.iife.js", "browser": "dist/owl.iife.js",
+1 -1
View File
@@ -1,6 +1,6 @@
# 🦉 OWL Roadmap 🦉 # 🦉 OWL Roadmap 🦉
- Current version: 1.4.7 - Current version: 1.4.8
- Status: stable - Status: stable
This roadmap is only an attempt at predicting Owl's future. Everything may This roadmap is only an attempt at predicting Owl's future. Everything may
+3 -2
View File
@@ -243,8 +243,9 @@ export class Fiber {
} }
component.__patch(target!, fiber.vnode!); component.__patch(target!, fiber.vnode!);
} else { } else {
if (fiber.shouldPatch) { const vnode = component.__owl__.vnode;
component.__patch(component.__owl__.vnode!, fiber.vnode!); if (fiber.shouldPatch && vnode) {
component.__patch(vnode, fiber.vnode!);
// When updating a Component's props (in directive), // When updating a Component's props (in directive),
// the component has a pvnode AND should be patched. // the component has a pvnode AND should be patched.
// However, its pvnode.elm may have changed if it is a High Order Component // However, its pvnode.elm may have changed if it is a High Order Component