1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-19 18:59:42 +00:00

fix RSOD if tm-copy-to-clipboard param is empty (#8393)

This commit is contained in:
Mario Pietsch 2024-07-17 22:49:40 +02:00 committed by GitHub
parent a4649490de
commit da8b213be5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -270,6 +270,7 @@ Copy plain text to the clipboard on browsers that support it
*/ */
exports.copyToClipboard = function(text,options) { exports.copyToClipboard = function(text,options) {
options = options || {}; options = options || {};
text = text || "";
var textArea = document.createElement("textarea"); var textArea = document.createElement("textarea");
textArea.style.position = "fixed"; textArea.style.position = "fixed";
textArea.style.top = 0; textArea.style.top = 0;