DEV: Review fixes

This commit is contained in:
Martin Brennan 2024-10-03 14:08:13 +10:00
parent c22eacd55e
commit 944feb5364
No known key found for this signature in database
GPG Key ID: BD981EFEEC8F5675
4 changed files with 10 additions and 10 deletions

View File

@ -1,13 +1,13 @@
let pluginHeaderActionComponents = [];
let pluginHeaderActionComponents = new Map();
export function registerPluginHeaderActionComponent(pluginId, componentKlass) {
pluginHeaderActionComponents[pluginId] = componentKlass;
export function registerPluginHeaderActionComponent(pluginId, componentClass) {
pluginHeaderActionComponents.set(pluginId, componentClass);
}
export function clearPluginHeaderActionComponents() {
pluginHeaderActionComponents = {};
pluginHeaderActionComponents = new Map();
}
export function headerActionComponentForPlugin(pluginId) {
return pluginHeaderActionComponents[pluginId];
return pluginHeaderActionComponents.get(pluginId);
}

View File

@ -3265,10 +3265,10 @@ class PluginApi {
* for that plugin -- one example is "Create export" for chat.
*
* @param {string} pluginId - The `dasherizedName` of the plugin using this component.
* @param {Class} componentKlass - The JS class of the component to render.
* @param {Class} componentClass - The JS class of the component to render.
*/
registerPluginHeaderActionComponent(pluginId, componentKlass) {
registerPluginHeaderActionComponent(pluginId, componentKlass);
registerPluginHeaderActionComponent(pluginId, componentClass) {
registerPluginHeaderActionComponent(pluginId, componentClass);
}
// eslint-disable-next-line no-unused-vars

View File

@ -202,7 +202,7 @@ module("Integration | Component | AdminPageHeader", function (hooks) {
});
module("Integration | Component | AdminPageHeader | Mobile", function (hooks) {
hooks.beforeEach(() => {
hooks.beforeEach(function () {
forceMobile();
});

View File

@ -132,7 +132,7 @@ module("Integration | Component | AdminPageSubheader", function (hooks) {
module(
"Integration | Component | AdminPageSubheader | Mobile",
function (hooks) {
hooks.beforeEach(() => {
hooks.beforeEach(function () {
forceMobile();
});