Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit e4993a2

Browse files
atwalg2jasonLaster
authored andcommitted
add flow header to src/utils/bootstrap.js (#5873)
1 parent a08b83a commit e4993a2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/utils/bootstrap.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
44

5+
// @flow
6+
57
import React from "react";
68
import { bindActionCreators, combineReducers } from "redux";
79
import ReactDOM from "react-dom";
@@ -30,8 +32,11 @@ import { prefs } from "./prefs";
3032
function renderPanel(component, store) {
3133
const root = document.createElement("div");
3234
root.className = "launchpad-root theme-body";
33-
root.style.setProperty("flex", 1);
35+
root.style.setProperty("flex", "1");
3436
const mount = document.querySelector("#mount");
37+
if (!mount) {
38+
return;
39+
}
3540
mount.appendChild(root);
3641

3742
ReactDOM.render(
@@ -40,7 +45,7 @@ function renderPanel(component, store) {
4045
);
4146
}
4247

43-
export function bootstrapStore(client, { services, toolboxActions }) {
48+
export function bootstrapStore(client: any, { services, toolboxActions }: any) {
4449
const createStore = configureStore({
4550
log: isTesting() || getValue("logging.actions"),
4651
timing: isDevelopment(),
@@ -80,7 +85,7 @@ export function teardownWorkers() {
8085
stopSearchWorker();
8186
}
8287

83-
export function bootstrapApp(store) {
88+
export function bootstrapApp(store: any) {
8489
if (isFirefoxPanel()) {
8590
renderPanel(App, store);
8691
} else {
@@ -89,7 +94,7 @@ export function bootstrapApp(store) {
8994
}
9095
}
9196

92-
function updatePrefs(state) {
97+
function updatePrefs(state: any) {
9398
const pendingBreakpoints = selectors.getPendingBreakpoints(state);
9499

95100
if (prefs.pendingBreakpoints !== pendingBreakpoints) {

0 commit comments

Comments
 (0)