Skip to content

Commit 87210b5

Browse files
committed
fix isBackend if statement
1 parent ce7e54f commit 87210b5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ FragmentNode.propTypes = {
1616

1717
export const settings = {
1818
hot: !!module.hot,
19-
SSR: !isBackend
19+
SSR: isBackend
2020
};
2121

2222
const getLoadable = importFunction => {
@@ -38,7 +38,7 @@ export class UnconnectedReactImportedComponent extends Component {
3838
loadable.load().catch(() => ({}));
3939
this.state.mark = loadable.mark;
4040

41-
if (!isBackend && settings.SSR && typeof this.props.streamId !== 'undefined') {
41+
if (isBackend && settings.SSR && typeof this.props.streamId !== 'undefined') {
4242
useMark(this.props.streamId, loadable.mark);
4343
if (this.state.state !== STATE_DONE) {
4444
this.state.state = STATE_LOADING;

src/loadable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const toLoadable = (importFunction, autoImport = true) => {
6666
mark.forEach(subMark => loadMark(subMark, loadable))
6767
}
6868

69-
if (!isBackend && autoImport) {
69+
if (
70+
isBackend && autoImport) {
7071
loadable.load();
7172
}
7273
return loadable;

0 commit comments

Comments
 (0)