Skip to content

Commit

Permalink
Merge pull request #88 from smooth-code/fix-ssr-hmr
Browse files Browse the repository at this point in the history
fix: fix SSR with HMR #85
  • Loading branch information
gregberge authored May 23, 2018
2 parents 5f25f44 + 20138e1 commit 71e2bff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable react/no-danger, no-underscore-dangle */
import React from 'react'
import { LOADABLE } from '../constants'
import { reset as resetTracker } from '../componentTracker'
import DeferredState from './DeferredState'

function isReactElement(element) {
Expand Down Expand Up @@ -172,6 +173,9 @@ export function getLoadableState(
fetchRoot = true,
tree = {},
) {
// Prevent duplicated components
resetTracker()

const queries = getQueriesFromTree({ rootElement, rootContext }, fetchRoot)

// no queries found, nothing to do
Expand Down

0 comments on commit 71e2bff

Please sign in to comment.