Skip to content

Commit

Permalink
fix: support nextjs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 7, 2023
1 parent ae0073b commit 5cf8675
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
5 changes: 3 additions & 2 deletions dist/copy-to-clipboard.cjs.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**!
* @uiw/copy-to-clipboard v1.0.12
* @uiw/copy-to-clipboard v1.0.14
* Copy to clipboard.
*
* Copyright (c) 2023 Kenny Wang
* https://github.com/uiwjs/copy-to-clipboard.git
*
* @website: https://github.com/uiwjs/copy-to-clipboard.git
* @website: https://uiwjs.github.io/copy-to-clipboard
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -38,6 +38,7 @@
* @param {CopyTextToClipboard} cb
*/
function copyTextToClipboard(text, cb) {
if (typeof document === "undefined") return;
const el = document.createElement('textarea');
el.value = text;
el.setAttribute('readonly', '');
Expand Down
5 changes: 3 additions & 2 deletions dist/copy-to-clipboard.esm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**!
* @uiw/copy-to-clipboard v1.0.12
* @uiw/copy-to-clipboard v1.0.14
* Copy to clipboard.
*
* Copyright (c) 2023 Kenny Wang
* https://github.com/uiwjs/copy-to-clipboard.git
*
* @website: https://github.com/uiwjs/copy-to-clipboard.git
* @website: https://uiwjs.github.io/copy-to-clipboard
* Licensed under the MIT license
*/
Expand Down Expand Up @@ -36,6 +36,7 @@
* @param {CopyTextToClipboard} cb
*/
function copyTextToClipboard(text, cb) {
if (typeof document === "undefined") return;
const el = document.createElement('textarea');
el.value = text;
el.setAttribute('readonly', '');
Expand Down
5 changes: 3 additions & 2 deletions dist/copy-to-clipboard.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/copy-to-clipboard.umd.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/copy-to-clipboard.umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/copy-to-clipboard.umd.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @param {CopyTextToClipboard} cb
*/
export default function copyTextToClipboard(text, cb) {
if (typeof document === "undefined") return;
const el = document.createElement('textarea');
el.value = text;
el.setAttribute('readonly', '');
Expand Down

0 comments on commit 5cf8675

Please sign in to comment.