Skip to content

Commit 480d039

Browse files
committed
fix(logging): log error if has error
1 parent c72fca9 commit 480d039

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

src/server.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
const appConfig = require("../config/main");
22

33
import * as e6p from "es6-promise";
4-
(e6p as any).polyfill();
54
import "isomorphic-fetch";
65

76
import * as React from "react";
87
import * as ReactDOMServer from "react-dom/server";
98

10-
import { Provider } from "react-redux";
11-
import { createMemoryHistory, match } from "react-router";
12-
import { syncHistoryWithStore } from "react-router-redux";
13-
const { ReduxAsyncConnect, loadOnServer } = require("redux-connect");
14-
import { configureStore } from "./app/redux/configureStore";
9+
import {Provider} from "react-redux";
10+
import {createMemoryHistory, match} from "react-router";
11+
import {syncHistoryWithStore} from "react-router-redux";
12+
import {configureStore} from "./app/redux/configureStore";
1513
import routes from "./app/routes/routes";
1614

17-
import { Html } from "./app/containers";
15+
import {Html} from "./app/containers";
16+
(e6p as any).polyfill();
17+
const { ReduxAsyncConnect, loadOnServer } = require("redux-connect");
1818
const manifest = require("../build/manifest.json");
1919

2020
const express = require("express");
@@ -74,7 +74,11 @@ app.get("*", (req, res) => {
7474
if (appConfig.ssr) {
7575
res.status(200).send(renderHTML(markup, store));
7676
}else {
77-
res.sendFile(path.resolve("./build/index.html"), (err) => {console.error(err); });
77+
res.sendFile(path.resolve("./build/index.html"), (err) => {
78+
if (err) {
79+
console.error(err);
80+
}
81+
});
7882
}
7983
});
8084
} else {

0 commit comments

Comments
 (0)