From 14e23759c627854727449e93e3f90540368c8474 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 23 Mar 2022 21:14:21 -0400 Subject: [PATCH] *Fix apiMetadata --- src/browser-polyfill.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/browser-polyfill.js b/src/browser-polyfill.js index d272a47..6d96e09 100644 --- a/src/browser-polyfill.js +++ b/src/browser-polyfill.js @@ -1,10 +1,9 @@ -/* @@package_name - v@@version - @@timestamp */ -/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim: set sts=2 sw=2 et tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; +// eslint-disable-next-line no-undef +const apiMetadata = require("../api-metadata.json"); if (typeof globalThis.browser === "undefined" || Object.getPrototypeOf(globalThis.browser) !== Object.prototype) { const CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE = "The message port closed before a response was received."; @@ -19,8 +18,6 @@ if (typeof globalThis.browser === "undefined" || Object.getPrototypeOf(globalThi // NOTE: apiMetadata is associated to the content of the api-metadata.json file // at build time by replacing the following "include" with the content of the // JSON file. - const apiMetadata = {/* include("api-metadata.json") */}; - if (Object.keys(apiMetadata).length === 0) { throw new Error("api-metadata.json has not been included in browser-polyfill"); }