szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.71k stars 172 forks source link

Fix privacyDropdown is null issue #267

Closed luochen1990 closed 3 weeks ago

luochen1990 commented 4 months ago

The issue:

Uncaught TypeError: Cannot read properties of null (reading 'value')
    at fileOversized ((index):239:33)
    at HTMLInputElement.<anonymous> ((index):284:9)

Related JS code:

159    const privacyDropdown = document.getElementById("privacy");

239            if (privacyDropdown.value == "secret") {