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

Fix #249 #250

Merged
merged 2 commits into from
May 15, 2020
Merged

Fix #249 #250

merged 2 commits into from
May 15, 2020

Conversation

NaridaL
Copy link
Collaborator

@NaridaL NaridaL commented May 15, 2020

Fixes #249

@NaridaL
Copy link
Collaborator Author

NaridaL commented May 15, 2020

Test failure:

 FAIL  test/lazy-observable.js      
  ● lazy observable pending can be observed

    [mobx] Since strict-mode is enabled, changing observed observable values outside actions 
is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ObservableValue@14

      56 |         if (!started) {
      57 |             started = true
    > 58 |             pending.set(true)
         |                     ^
      59 |             fetch((newValue: T) => {
      60 |                 _allowStateChanges(true, () => {
      61 |                     value.set(newValue)

      at invariant (node_modules/mobx/lib/mobx.js:94:15)
      at fail (node_modules/mobx/lib/mobx.js:89:5)
      at checkIfStateModificationsAreAllowed (node_modules/mobx/lib/mobx.js:707:9)
      at ObservableValue.Object.<anonymous>.ObservableValue.prepareNewValue (node_modules/mobx/lib/mobx.js:1017:9)
      at ObservableValue.Object.<anonymous>.ObservableValue.set (node_modules/mobx/lib/mobx.js:1000:25)
      at Object.currentFnc [as current] (src/lazy-observable.ts:58:21)
      at Object.<anonymous> (test/lazy-observable.js:124:8)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 93.5% when pulling d7cf0b5 on fix-249 into 4b59640 on master.

@NaridaL
Copy link
Collaborator Author

NaridaL commented May 15, 2020

@benjamingr Thanks for reviewing.

The continuous-integration/travis-ci/pr job is green on travis but doesn't seem to have updated here.

@NaridaL NaridaL merged commit 643c44a into master May 15, 2020
@NaridaL NaridaL deleted the fix-249 branch January 15, 2021 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in lazyObservable pending state
3 participants