discourse/app/assets/javascripts/discourse-common/addon
David Taylor 8958b4f76a
DEV: Rename custom getOwner to getOwnerWithFallback (#23437)
Our custom implementation of `getOwner` includes a fallback which returns an owner, even if the passed object does not have one set. This is confusing and creates a false sense of security. Generally if the fallback is used, it means there is a problem with the patterns being used.

This commit renames our custom implementation to `getOwnerWithFallback`, while maintaining the old `getOwner` export with a deprecation notice. Core code is updated to use the official `@ember/application` implementation, or the new `getOwnerWithFallback` function.

This commit updates all core uses of `{ getOwner } from discourse-common/lib/get-owner` to use `getOwnerWithFallback`. Future commits will work through and convert many of these to use the official `@ember/application` implementation
2023-09-26 14:30:52 +01:00
..
config Revert "FIX: delay custom section reorder (#20781)" (#20786) 2023-03-23 11:27:12 +01:00
helpers Revert "UX: Simplify and redesign summary skeleton (#22965)" (#23012) 2023-08-08 07:55:37 -05:00
lib DEV: Rename custom getOwner to getOwnerWithFallback (#23437) 2023-09-26 14:30:52 +01:00
utils DEV: Use object spread instead of Object.assign({}, …) (#23167) 2023-08-21 14:28:16 +02:00
.gitkeep
resolver.js DEV: Remove legacy resolver (#21263) 2023-04-26 13:39:15 -05:00