discourse/app/assets/javascripts/discourse-common/addon/lib
Jarek Radosz 7b8343d482
FIX: Support getters in hbr #each context (#28941)
There is a risk of overriding and then deleting a prop of the context in case of a naming clash between localName and that prop, e.g.

```js
class Test {
  item = "foo";
  items = [1, 2];
}

const template = `
  {{#each items as |item|}}
    {{item}}
  {{/each}}
`;
const compiledTemplate = compile(template);

const object = new Test();
// object.item === "foo"
const output = compiledTemplate(object, RUNTIME_OPTIONS);
// object.item === undefined
```

…but I think we can accept this risk and just be careful.`#each` isn't widely used in hbr anyway (as proven by the other long-standing and recently fixed bug) and hbr is on its way out anyway.
2024-09-17 12:07:07 +02:00
..
attribute-hook.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
avatar-utils.js Consistently import escape from discourse-common (#23790) 2023-10-11 22:21:01 +01:00
case-converter.js DEV: Add case-converter common lib and use with AdminPlugin (#27725) 2024-07-05 13:22:48 +10:00
debounce.js FIX: reimplements chat audio into a service (#18983) 2022-11-11 13:11:41 +01:00
deprecated.js DEV: Update ember-cli-deprecation-workflow from 2.2.0 to 3.0.1 (#28226) 2024-08-07 17:59:42 +02:00
discourse-template-map.js Enable Embroider/Webpack code spliting for Wizard (#24919) 2023-12-20 13:15:06 +00:00
dom-from-string.js DEV: Allow utility class domFromString to take in strings with multiple top level elements (#15548) 2022-01-12 19:49:24 +08:00
escape.js
get-owner.js DEV: Clean up imports (#28060) 2024-07-25 15:09:06 +02:00
get-url.js FIX: Validate asset url before replacing base url (#16438) 2023-01-30 07:32:48 +08:00
helpers.js DEV: Update registerUnbound() to native class syntax (#28613) 2024-08-28 19:06:14 +01:00
icon-library.js UX: Upgrade to fontawesome 6.6.0 (#28778) 2024-09-09 14:40:56 +01:00
later.js DEV: Introduce discourseLater (#17532) 2022-07-17 00:50:49 +02:00
loader-shim.js Enable Embroider/Webpack code spliting for Wizard (#24919) 2023-12-20 13:15:06 +00:00
object.js DEV: Resolve and prevent user fixture changes leaking between tests (#23898) 2023-10-11 13:46:06 +01:00
popular-themes.js UX: Add new preview links to Popular Themes (#27518) 2024-06-19 08:12:36 +10:00
raw-handlebars-helpers.js FIX: Support getters in hbr #each context (#28941) 2024-09-17 12:07:07 +02:00
raw-handlebars.js DEV: Use DiscourseJsProcessor for theme template compilation (#18135) 2022-09-01 11:50:46 +01:00
raw-templates.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
suffix-trie.js