fix: resolve JavaScript const redeclaration and MarkitectMain issues
**JavaScript Fixes:** - Fixed const redeclaration error: removed duplicate MARKITECT_STRICT_MODE declaration from control-base.js - Fixed MarkitectMain not available: updated plugin to load main-updated.js instead of main.js - Added MARKITECT_STRICT_MODE declaration to main-updated.js for consistency - Ensured only one main file is loaded to prevent conflicts **Plugin Asset Updates:** - Changed testdrive-jsui plugin asset list from main.js to main-updated.js - Verified proper loading order and dependency resolution - All JavaScript constants now declared exactly once **Testing Infrastructure:** - Comprehensive JavaScript fix verification test - Browser-ready test file generation for manual verification - Automated const declaration conflict detection - Asset loading order validation **Key Fixes:** - ❌ "Uncaught SyntaxError: redeclaration of const MARKITECT_STRICT_MODE" → ✅ Resolved - ❌ "⚠️ MarkitectMain not available, edit functionality may be limited" → ✅ Resolved - ❌ Multiple main.js files causing conflicts → ✅ Single main-updated.js loaded **Verification Results:** ``` ✅ No const declaration conflicts ✅ MarkitectMain properly declared once ✅ Correct main-updated.js file loaded ✅ HTML references correct scripts ``` Browser console should now show: - 🎯 "TestDrive JSUI loading complete, initializing..." - 🚀 "Starting MarkitectMain initialization..." - ✅ No redeclaration errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,12 +5,7 @@
|
||||
*/
|
||||
|
||||
// Development mode detection (must match main.js)
|
||||
const MARKITECT_STRICT_MODE = (
|
||||
window.location.hostname === 'localhost' ||
|
||||
window.location.hostname === '127.0.0.1' ||
|
||||
window.location.search.includes('strict=true') ||
|
||||
window.markitectStrictMode === true
|
||||
);
|
||||
// MARKITECT_STRICT_MODE is declared in main.js
|
||||
|
||||
const Control = {
|
||||
// Default configuration
|
||||
|
||||
Reference in New Issue
Block a user