mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] *: remove useless values to t-else and t-debug
The actual value does not matter, only the fact that it is present. closes #564
This commit is contained in:
@@ -946,7 +946,7 @@ For example, here is how we could implement an `ErrorBoundary` component:
|
||||
<t t-if="state.error">
|
||||
Error handled
|
||||
</t>
|
||||
<t t-else="1">
|
||||
<t t-else="">
|
||||
<t t-slot="default" />
|
||||
</t>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@ class SomeComponent extends Component {
|
||||
<t t-if=device.isMobile>
|
||||
some simplified user interface
|
||||
</t>
|
||||
<t t-else="1">
|
||||
<t t-else="">
|
||||
a more advanced user interface
|
||||
</t>
|
||||
</div>`;
|
||||
|
||||
@@ -28,7 +28,7 @@ generate a virtual dom representation of the HTML.
|
||||
```xml
|
||||
<div>
|
||||
<span t-if="somecondition">Some string</span>
|
||||
<ul t-else="1">
|
||||
<ul t-else="">
|
||||
<li t-foreach="messages" t-as="message">
|
||||
<t t-esc="message"/>
|
||||
</li>
|
||||
@@ -101,7 +101,7 @@ precisely, the result of a template rendering should have a single root node:
|
||||
<!–– ok: result has one single root node ––>
|
||||
<t>
|
||||
<div t-if="someCondition">foo</div>
|
||||
<span t-else="1">bar</span>
|
||||
<span t-else="">bar</span>
|
||||
</t>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user