diff --git a/counter/static/bundled/counter/components/ajax-select-index.ts b/counter/static/bundled/counter/components/ajax-select-index.ts index e76970fe..85b8238d 100644 --- a/counter/static/bundled/counter/components/ajax-select-index.ts +++ b/counter/static/bundled/counter/components/ajax-select-index.ts @@ -28,18 +28,23 @@ export class ProductAjaxSelect extends AjaxSelect { return []; } - private getName(item: SimpleProductSchema, sanitize: typeof escape_html): string { + // In the context in which this method is called, `this` might be shadowed + // We need to call it explicitly from the class itself + private static getName( + item: SimpleProductSchema, + sanitize: typeof escape_html, + ): string { return item.code ? `${sanitize(item.code)} - ${sanitize(item.name)}` : item.name; } protected renderOption(item: SimpleProductSchema, sanitize: typeof escape_html) { return `