check if the paste contents is empty
This commit is contained in:
parent
5b95ce2e33
commit
2f008730f9
@ -47,6 +47,10 @@
|
|||||||
var pasteInput = document.getElementById('paste-input');
|
var pasteInput = document.getElementById('paste-input');
|
||||||
var paste = pasteInput.value;
|
var paste = pasteInput.value;
|
||||||
|
|
||||||
|
if (!paste || paste.trim() === ''){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fetch('/api/upload', {
|
fetch('/api/upload', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
Reference in New Issue
Block a user