From 58944ba266e03b18fd56a9e86648cf711b0b5965 Mon Sep 17 00:00:00 2001 From: Alexander Freistetter Date: Thu, 29 Jun 2023 11:13:55 +0200 Subject: [PATCH] fix the global this js error for older browsers --- third_party/zxing-js.umd.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/third_party/zxing-js.umd.js b/third_party/zxing-js.umd.js index 6cb3d6f..1f9a896 100644 --- a/third_party/zxing-js.umd.js +++ b/third_party/zxing-js.umd.js @@ -2794,7 +2794,11 @@ } } - var __awaiter = ((globalThis || global || self || window || undefined) && (globalThis || global || self || window || undefined).__awaiter) || function (thisArg, _arguments, P, generator) { + const g = (typeof globalThis !== 'undefined') ? globalThis : + (typeof global !== 'undefined') ? global : + (typeof self !== 'undefined') ? self : + (typeof window !== 'undefined') ? window : {}; + var __awaiter = (g.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }