diff --git a/src/js/api.php b/src/js/api.php index c0435b0..3b96f14 100644 --- a/src/js/api.php +++ b/src/js/api.php @@ -20,6 +20,8 @@ const http = { const API = { mastodon: { registerInstance: function(instance) { + if (instance === null) + instance = document.getElementById('instanceURL').value; http.get('/api/login/mastodon/get_client.php?instance='+encodeURIComponent(instance), {}, function(data) { data = JSON.parse(data);