aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitly.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitly.js b/bitly.js
index a648013..e8db8dd 100644
--- a/bitly.js
+++ b/bitly.js
@@ -138,7 +138,9 @@ let PLUGIN_INFO =
[name],
'Copy ' + domain + ' url',
function (args) {
- shorten(args.literalArg || buffer.URL, domain, function (short) {
+ let url = util.stringToURLArray(args.literalArg)[0];
+
+ shorten(url || buffer.URL, domain, function (short) {
util.copyToClipboard(short);
liberator.echo('`' + short + "' was copied to clipboard.");
});