From 4036c8286400b809b3a8ba4789737cdbe1f0dce2 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 29 Mar 2020 17:38:18 -0700 Subject: [PATCH] Don't replace link with title if API doesn't provide title. --- src/Linkification/Embedding.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Linkification/Embedding.coffee b/src/Linkification/Embedding.coffee index df2d3e1fd..dac6c1f3d 100644 --- a/src/Linkification/Embedding.coffee +++ b/src/Linkification/Embedding.coffee @@ -222,7 +222,10 @@ Embedding = switch status when 200, 304 text = service.text req.response, uid - Embedding.cache.set data, text + if typeof text is 'string' + Embedding.cache.set data, text + else + text = link.textContent when 404 text = "Not Found" when 403