mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-13 22:13:00 +00:00
fix: Wrap debug console.log in debug flag check
Fix unconditional debug logging that outputs internal implementation
details to browser console for all users.
Problem:
- console.log('[ARRAY-OBJECTS] Functions defined on window:', ...)
executes unconditionally when page loads
- Outputs debug information about function availability to all users
- Appears to be development/debugging code inadvertently included
- Noisy console output in production
Solution:
- Wrap console.log statement in _PLUGIN_DEBUG_EARLY check to only
output when pluginDebug localStorage flag is enabled
- Matches pattern used elsewhere in the file for debug logging
- Debug info now only visible when explicitly enabled via
localStorage.setItem('pluginDebug', 'true')
This commit is contained in:
@@ -6671,6 +6671,8 @@ if (typeof window !== 'undefined') {
|
|||||||
window.updateArrayObjectData(fieldId);
|
window.updateArrayObjectData(fieldId);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Debug logging (only if pluginDebug is enabled)
|
||||||
|
if (_PLUGIN_DEBUG_EARLY) {
|
||||||
console.log('[ARRAY-OBJECTS] Functions defined on window:', {
|
console.log('[ARRAY-OBJECTS] Functions defined on window:', {
|
||||||
addArrayObjectItem: typeof window.addArrayObjectItem,
|
addArrayObjectItem: typeof window.addArrayObjectItem,
|
||||||
removeArrayObjectItem: typeof window.removeArrayObjectItem,
|
removeArrayObjectItem: typeof window.removeArrayObjectItem,
|
||||||
@@ -6679,6 +6681,7 @@ if (typeof window !== 'undefined') {
|
|||||||
removeArrayObjectFile: typeof window.removeArrayObjectFile
|
removeArrayObjectFile: typeof window.removeArrayObjectFile
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Make currentPluginConfig globally accessible (outside IIFE)
|
// Make currentPluginConfig globally accessible (outside IIFE)
|
||||||
window.currentPluginConfig = null;
|
window.currentPluginConfig = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user