Skip to content

SimulAI v1.1

Choose a tag to compare

@MaloneFreak MaloneFreak released this 16 Jul 15:02
· 26 commits to main since this release
b0796f4

Version Changelog - Bug Fixes & Security Update

This update focuses on fixing critical JavaScript syntax errors that prevented the application from running correctly and enhances data security with updated Firestore rules.

🐛 Fixes

  • Initialization Syntax Fix: Fixed a syntax error in the initializeUser function that prevented the creation of the Firestore history collection reference. The collection path now correctly uses a template literal (backticks `).
  • innerHTML Assignment Fix: Fixed a syntax error in all functions that dynamically generate HTML (displayQuiz, evaluateQuiz, loadHistory). Multi-line HTML strings were not enclosed in backticks, which was causing an Uncaught SyntaxError.
  • querySelector Selector Fix: Fixed a syntax error in the evaluateQuiz function where dynamic element selectors were not properly quoted as strings, which prevented the application from finding user answers.
  • Improved Variable Declaration: The userId and historyCollectionRef variables have been moved to the main module scope to ensure they are accessible by all functions that use them, preventing potential reference errors.
  • Error Message Fix: Fixed a syntax error in the console.error call within the parseQuestionBlock function.

🔒 Security

  • Firestore Security Rules: Updated Firestore rules to ensure that authenticated users can only read and write their own documents in the simulai_history collection. This prevents any user from accessing or modifying another user's data.