dodona-edu / dodona

🧑‍💻 Learn to code for secondary and higher education
https://dodona.be
MIT License
71 stars 23 forks source link

Empty submission results in uncaught JavaScript exception #4882

Closed niknetniko closed 1 year ago

niknetniko commented 1 year ago

An empty submission causes an uncaught JavaScript error (e.g. https://dodona.be/en/submissions/14595187/):

Uncaught (in promise) TypeError: First argument must be a String, HTMLElement, HTMLCollection, or NodeList
    at e.exports (commons-cfc6c1fbd1ed3a6e5c4f0eaf96e11876c28e28a7293423158e612e49f1485dbf.js:76:26861)
    at t.value (commons-cfc6c1fbd1ed3a6e5c4f0eaf96e11876c28e28a7293423158e612e49f1485dbf.js:76:22960)
    at new t (commons-cfc6c1fbd1ed3a6e5c4f0eaf96e11876c28e28a7293423158e612e49f1485dbf.js:76:21660)
    at Object.i [as attachClipboard] (commons-cfc6c1fbd1ed3a6e5c4f0eaf96e11876c28e28a7293423158e612e49f1485dbf.js:69:989)
    at (index):3357:17

Low priority since everything still seems to work; the stacktrace leads me to think it might have something to do with the "copy" button that doesn't handle no code being present.

jorg-vr commented 1 year ago

bug is in the old attachClipboard, willl be fixed by #4499

will close this issue in favour of #4499