*Fix apiMetadata
This commit is contained in:
parent
9ee7c32ed0
commit
14e23759c6
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue