Skip to content

Commit 5cf8675

Browse files
committed
1 parent ae0073b commit 5cf8675

7 files changed

+14
-10
lines changed

dist/copy-to-clipboard.cjs.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**!
2-
* @uiw/copy-to-clipboard v1.0.12
2+
* @uiw/copy-to-clipboard v1.0.14
33
* Copy to clipboard.
44
*
55
* Copyright (c) 2023 Kenny Wang
66
* https://github.com/uiwjs/copy-to-clipboard.git
77
*
8-
* @website: https://github.com/uiwjs/copy-to-clipboard.git
8+
* @website: https://uiwjs.github.io/copy-to-clipboard
99
1010
* Licensed under the MIT license
1111
*/
@@ -38,6 +38,7 @@
3838
* @param {CopyTextToClipboard} cb
3939
*/
4040
function copyTextToClipboard(text, cb) {
41+
if (typeof document === "undefined") return;
4142
const el = document.createElement('textarea');
4243
el.value = text;
4344
el.setAttribute('readonly', '');

dist/copy-to-clipboard.esm.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**!
2-
* @uiw/copy-to-clipboard v1.0.12
2+
* @uiw/copy-to-clipboard v1.0.14
33
* Copy to clipboard.
44
*
55
* Copyright (c) 2023 Kenny Wang
66
* https://github.com/uiwjs/copy-to-clipboard.git
77
*
8-
* @website: https://github.com/uiwjs/copy-to-clipboard.git
8+
* @website: https://uiwjs.github.io/copy-to-clipboard
99
1010
* Licensed under the MIT license
1111
*/
@@ -36,6 +36,7 @@
3636
* @param {CopyTextToClipboard} cb
3737
*/
3838
function copyTextToClipboard(text, cb) {
39+
if (typeof document === "undefined") return;
3940
const el = document.createElement('textarea');
4041
el.value = text;
4142
el.setAttribute('readonly', '');

dist/copy-to-clipboard.umd.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/copy-to-clipboard.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/copy-to-clipboard.umd.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/copy-to-clipboard.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @param {CopyTextToClipboard} cb
2525
*/
2626
export default function copyTextToClipboard(text, cb) {
27+
if (typeof document === "undefined") return;
2728
const el = document.createElement('textarea');
2829
el.value = text;
2930
el.setAttribute('readonly', '');

0 commit comments

Comments
 (0)