fix: OWL template error — Number() not available in template context
Use a formatPrice() method on the component instead of calling Number() directly in the OWL template. Fixes TypeError: ctx.Number is not a function. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -187,6 +187,17 @@ export class ProductMapping extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Helpers
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
formatPrice(val) {
|
||||
if (val === null || val === undefined || val === false) return "—";
|
||||
const n = parseFloat(val);
|
||||
if (isNaN(n)) return "—";
|
||||
return "$" + n.toFixed(2);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Tab handlers
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user