Skip to content

Commit

Permalink
[convert.ts] Make sure to call new promiseConstructor(…) instead of…
Browse files Browse the repository at this point in the history
… new Promise(…)`.
  • Loading branch information
lgarron committed Jan 5, 2024
1 parent 852f523 commit d328e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clipboard-polyfill/ClipboardItem/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function clipboardItemToGlobalClipboardItem(
return promiseRecordMap(clipboardItem.types, function (type: string) {
return clipboardItem.getType(type);
}).then((items: Record<string, Blob>) => {
return new Promise((resolve, reject) => {
return new promiseConstructor((resolve, reject) => {
var options: ClipboardItemOptions = {};
if (clipboardItem.presentationStyle) {
options.presentationStyle = clipboardItem.presentationStyle;
Expand Down

0 comments on commit d328e2c

Please sign in to comment.