Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with Offline Mode (replaceState) #4

Closed
addyosmani opened this issue Oct 17, 2016 · 1 comment
Closed

Bug with Offline Mode (replaceState) #4

addyosmani opened this issue Oct 17, 2016 · 1 comment
Labels

Comments

@addyosmani
Copy link
Owner

#3 uncovered another small bug. When the Settings menu has been toggled, offline mode is

triggering this.replaceState exceptions in StoryListItem.js:

5453

@addyosmani addyosmani added the bug label Oct 17, 2016
@addyosmani
Copy link
Owner Author

addyosmani commented Oct 17, 2016

Line throwing:

  initLiveItem(props) {
    if (SettingsStore.offlineMode) {
      HNServiceRest.itemRef(props.id).then(function(res) {
        return res.json()
      }).then(function(snapshot) {
        this.replaceState({ item: snapshot }) // <--
      }.bind(this))
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant