diff --git a/assets/js/_commons/copy-link.js b/assets/js/_commons/copy-link.js index 0f5aab8..5a9c100 100644 --- a/assets/js/_commons/copy-link.js +++ b/assets/js/_commons/copy-link.js @@ -8,12 +8,10 @@ function copyLink(url) { if (!url || 0 === url.length) { - return; + url = window.location.href; } - - url = window.location.href; + var $temp = $(""); - $("body").append($temp); $temp.val(url).select(); document.execCommand("copy"); @@ -21,4 +19,4 @@ function copyLink(url) { alert("Link copied successfully!"); -} \ No newline at end of file +}