- commit
- 8b3b064371c2c680732b513a816af5fe8b409441
- parent
- c80c87e56c3d59edee735412504b6f4f107dd8e3
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-05-29 13:04
catch decode exceptions
Diffstat
| M | static/main.js | 6 | +++++- |
1 files changed, 5 insertions, 1 deletions
diff --git a/static/main.js b/static/main.js
@@ -14,7 +14,11 @@ var decode = function(string) {
14 14
15 15 var textarea = document.querySelector('textarea');
16 16
17 -1 textarea.value = decode(location.hash.substr(1));
-1 17 try {
-1 18 textarea.value = decode(location.hash.substr(1));
-1 19 } catch (e) {
-1 20 console.exception(e);
-1 21 }
18 22
19 23 textarea.addEventListener('input', event => {
20 24 history.replaceState(null, '', '#' + encode(textarea.value));