Skip to content

Commit

Permalink
fix: fix SSR with HMR #85
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed May 23, 2018
1 parent 5f25f44 commit 20138e1
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

2 comments on commit 20138e1

@wellyshen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neoziro Does it means this issue is solved?

@gregberge
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wellyshen yes it should be!

Please sign in to comment.