Uploaded image for project: 'Mojang Web Services'
  1. Mojang Web Services
  2. WEB-6484

TypeError on all pages that use main.js

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Low Low
    • minecraft.net

      Last Checked: 17th May, 2023

      Effected pages:
      All pages with this script www.minecraft.net/etc.clientlibs/minecraft/clientlibs/main.{id_here}.js

      Ex. https://www.minecraft.net/etc.clientlibs/minecraft/clientlibs/main.7c46a10e40e92a94207e6ac0119e2c27.js

       

      On these pages in the console there is this error, "Uncaught TypeError: Cannot read properties of null (reading 'querySelectorAll')". This is due to them not checking if the response of `document.querySelector("#myModal")` is null or not. This would be perfectly fine on smaller websites, but is completely unacceptable on a huge website like minecraft.net. This is such a easily avoidable mistake to make while coding especially for a huge company like Mojang Studios.

      Example of a page with this error:
      https://www.minecraft.net/

            mojangweb [Mojang] Web Team
            Faav Vafas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: