aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--copy.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/copy.js b/copy.js
index 76f5acb..92a059b 100644
--- a/copy.js
+++ b/copy.js
@@ -288,7 +288,8 @@ var exCopyManager = {
copyString = e.toString();
}
} else {
- if (!arg) arg = liberator.globalVariables.copy_templates[0];
+ if (!arg) arg = liberator.globalVariables.copy_templates[0].label;
+
var template = getCopyTemplate(arg) || {value: arg};
if (typeof template.custom == 'function'){
copyString = template.custom.call(this, template.value);
@@ -298,7 +299,9 @@ var exCopyManager = {
copyString = replaceVariable(template.value);
}
}
- util.copyToClipboard(copyString || '');
+
+ if (copyString)
+ util.copyToClipboard(copyString);
if (isError){
liberator.echoerr('CopiedErrorString: `' + copyString + "'");
} else {