mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +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,13 +6671,16 @@ if (typeof window !== 'undefined') {
|
||||
window.updateArrayObjectData(fieldId);
|
||||
};
|
||||
|
||||
console.log('[ARRAY-OBJECTS] Functions defined on window:', {
|
||||
addArrayObjectItem: typeof window.addArrayObjectItem,
|
||||
removeArrayObjectItem: typeof window.removeArrayObjectItem,
|
||||
updateArrayObjectData: typeof window.updateArrayObjectData,
|
||||
handleArrayObjectFileUpload: typeof window.handleArrayObjectFileUpload,
|
||||
removeArrayObjectFile: typeof window.removeArrayObjectFile
|
||||
});
|
||||
// Debug logging (only if pluginDebug is enabled)
|
||||
if (_PLUGIN_DEBUG_EARLY) {
|
||||
console.log('[ARRAY-OBJECTS] Functions defined on window:', {
|
||||
addArrayObjectItem: typeof window.addArrayObjectItem,
|
||||
removeArrayObjectItem: typeof window.removeArrayObjectItem,
|
||||
updateArrayObjectData: typeof window.updateArrayObjectData,
|
||||
handleArrayObjectFileUpload: typeof window.handleArrayObjectFileUpload,
|
||||
removeArrayObjectFile: typeof window.removeArrayObjectFile
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Make currentPluginConfig globally accessible (outside IIFE)
|
||||
|
||||
Reference in New Issue
Block a user