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