Skip to content

Commit e875a34

Browse files
committed
updateButtonsForProfileChange call - Reduced unused code and corrected all calls to it to provide correct parameter.
1 parent 951921e commit e875a34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

init.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ if (!window.__OCP_messageListenerRegistered_v2) {
4848
}
4949
if (window.MaxExtensionButtonsInit && typeof window.MaxExtensionButtonsInit.updateButtonsForProfileChange === 'function') {
5050
// Forward origin so updateButtonsForProfileChange can limit which container(s) are updated.
51-
window.MaxExtensionButtonsInit.updateButtonsForProfileChange(origin);
51+
// Default to 'inline' if no origin is specified, as that's the primary UI element
52+
const effectiveOrigin = origin || 'inline';
53+
window.MaxExtensionButtonsInit.updateButtonsForProfileChange(effectiveOrigin);
5254
}
5355
} catch (e) {
5456
// If anything goes wrong, fallback to full re-init on next call

0 commit comments

Comments
 (0)