Enable strict mode for extension build

This commit is contained in:
hensm
2020-01-23 00:58:33 +00:00
parent 3553912584
commit 7f84b90431
59 changed files with 526 additions and 331 deletions

View File

@@ -1,5 +1,6 @@
"use strict";
import logger from "./logger";
import { stringify } from "./utils";
import { ReceiverSelection
@@ -27,6 +28,11 @@ export default async function loadSender (opts: LoadSenderOptions) {
switch (opts.selection.mediaType) {
case ReceiverSelectorMediaType.App: {
const shim = ShimManager.getShim(opts.tabId, opts.frameId);
if (!shim) {
throw logger.error(`Shim not found at tabId ${
opts.tabId} / frameId ${opts.frameId}`)
}
shim.contentPort.postMessage({
subject: "shim:/launchApp"
, data: { receiver: opts.selection.receiver }