DEV: Correctly clear global exported variables
This commit is contained in:
parent
258e9b22dd
commit
349f6e18f3
|
@ -9,7 +9,7 @@ export function addTopicTitleDecorator(decorator) {
|
|||
}
|
||||
|
||||
export function resetTopicTitleDecorators() {
|
||||
topicTitleDecorators = [];
|
||||
topicTitleDecorators.length = 0;
|
||||
}
|
||||
|
||||
export default Component.extend(KeyEnterEscape, {
|
||||
|
|
|
@ -108,6 +108,6 @@ export function addSectionLink(args, secondary) {
|
|||
}
|
||||
|
||||
export function resetDefaultSectionLinks() {
|
||||
customSectionLinks = [];
|
||||
secondaryCustomSectionLinks = [];
|
||||
customSectionLinks.length = 0;
|
||||
secondaryCustomSectionLinks.length = 0;
|
||||
}
|
||||
|
|
|
@ -10,5 +10,5 @@ export function addSidebarSection(func) {
|
|||
}
|
||||
|
||||
export function resetSidebarSection() {
|
||||
customSections.splice(0, customSections.length);
|
||||
customSections.length = 0;
|
||||
}
|
||||
|
|
|
@ -60,5 +60,5 @@ export function registerUserMenuTab(func) {
|
|||
}
|
||||
|
||||
export function resetUserMenuTabs() {
|
||||
CUSTOM_TABS_CLASSES.clear();
|
||||
CUSTOM_TABS_CLASSES.length = 0;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ export function setTestPresence(value) {
|
|||
}
|
||||
|
||||
export function clearPresenceCallbacks() {
|
||||
callbacks.splice(0, callbacks.length);
|
||||
callbacks.length = 0;
|
||||
}
|
||||
|
||||
if (!isTesting()) {
|
||||
|
|
|
@ -17,8 +17,8 @@ const LIKE_ACTION = 2;
|
|||
const VIBRATE_DURATION = 5;
|
||||
|
||||
const _builders = {};
|
||||
let _extraButtons = {};
|
||||
export let apiExtraButtons = {};
|
||||
let _extraButtons = {};
|
||||
let _buttonsToRemove = {};
|
||||
|
||||
export function addButton(name, builder) {
|
||||
|
@ -26,9 +26,12 @@ export function addButton(name, builder) {
|
|||
}
|
||||
|
||||
export function resetPostMenuExtraButtons() {
|
||||
_buttonsToRemove = {};
|
||||
apiExtraButtons = {};
|
||||
for (const key of Object.keys(apiExtraButtons)) {
|
||||
delete apiExtraButtons[key];
|
||||
}
|
||||
|
||||
_extraButtons = {};
|
||||
_buttonsToRemove = {};
|
||||
}
|
||||
|
||||
export function removeButton(name, callback) {
|
||||
|
|
Loading…
Reference in New Issue