Remove the unused canUseClipboard helper
canCopyText covers the same capability checks and is the one the app actually uses.
This commit is contained in:
2 files changed
-6
No files matched your search
@@ -19,10 +19,6 @@ function hasAsyncClipboard() {
|
||||
);
|
||||
}
|
||||
|
||||
export function canUseClipboard() {
|
||||
return hasAsyncClipboard();
|
||||
}
|
||||
|
||||
// True when text can be copied one way or another. Falls back to the legacy
|
||||
// `document.execCommand('copy')` path, which also works on non-secure origins
|
||||
// (e.g. a LAN dev server over plain http) where the async Clipboard API is
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { module, test } from 'qunit';
|
||||
import {
|
||||
canUseClipboard,
|
||||
canCopyText,
|
||||
canWebShare,
|
||||
copyText,
|
||||
@@ -55,7 +54,6 @@ module('Unit | Utility | share', function () {
|
||||
|
||||
test('capability guards return booleans without throwing', function (assert) {
|
||||
assert.strictEqual(typeof canWebShare(), 'boolean');
|
||||
assert.strictEqual(typeof canUseClipboard(), 'boolean');
|
||||
assert.strictEqual(typeof canCopyText(), 'boolean');
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user