Skip to content

Commit

Permalink
Fix clipboardy
Browse files Browse the repository at this point in the history
  • Loading branch information
tobeno committed Apr 6, 2024
1 parent 0ef7392 commit 5165ccb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
11 changes: 0 additions & 11 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"@babel/preset-typescript": "^7.24.1",
"@types/babel__generator": "^7.6.8",
"@types/babel__traverse": "^7.20.5",
"@types/clipboardy": "^2.0.1",
"@types/jsonwebtoken": "^9.0.6",
"@types/lodash": "^4.17.0",
"@types/marked": "^5.0.2",
Expand Down
6 changes: 4 additions & 2 deletions src/modules/clipboard/clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ export class Clipboard {
* Returns the clipboard contents as a string.
*/
get value(): string {
return require('clipboardy').readSync();
const clipboardy = require('clipboardy').default;
return clipboardy.readSync();
}

/**
* Sets the clipboard contents.
*/
set value(value: MaybeWrapped<string>) {
require('clipboardy').writeSync(String(value));
const clipboardy = require('clipboardy').default;
clipboardy.writeSync(String(value));
}

/**
Expand Down

0 comments on commit 5165ccb

Please sign in to comment.