Skip to content

Commit 7eef16b

Browse files
chore: revert bundled library change
1 parent dbfd3cc commit 7eef16b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

webplugin/js/app/mck-sidebox-1.0.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ const CHARACTER_LIMIT = { ES: 256, CX: 500 };
2020
const WARNING_LENGTH = { ES: 199, CX: 450 };
2121
const TALK_TO_HUMAN = 'Talk to human';
2222

23+
// DataTransferItemList in some browsers doesn't implement forEach.
24+
// This polyfill ensures paste handlers using `items.forEach` don't crash.
25+
if (
26+
typeof window !== 'undefined' &&
27+
window.DataTransferItemList &&
28+
window.DataTransferItemList.prototype &&
29+
!window.DataTransferItemList.prototype.forEach
30+
) {
31+
window.DataTransferItemList.prototype.forEach = Array.prototype.forEach;
32+
}
33+
2334
var userOverride = {
2435
voiceOutput: true,
2536
};

0 commit comments

Comments
 (0)