From eec5871f5f0de01e7a4bf5ba69c81315a8ea88e3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 13 Feb 2021 10:10:44 +0300 Subject: fail better if requested article URL is blank --- js/Article.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/Article.js') diff --git a/js/Article.js b/js/Article.js index 61368dfed..f8b0415b9 100644 --- a/js/Article.js +++ b/js/Article.js @@ -123,11 +123,13 @@ const Article = { Article.setActive(0); }, displayUrl: function (id) { - const query = {op: "rpc", method: "getlinktitlebyid", id: id}; + const query = {op: "article", method: "get_metadata_by_id", id: id}; xhrJson("backend.php", query, (reply) => { if (reply && reply.link) { prompt(__("Article URL:"), reply.link); + } else { + alert(__("No URL could be displayed for this article.")); } }); }, -- cgit v1.2.3-54-g00ecf