Skip to content

Commit

Permalink
code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Reisel committed Jan 23, 2017
1 parent 199f914 commit 9f8cdab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/derivation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function checkIfStateModificationsAreAllowed() {
if (!globalState.allowStateChanges) {
invariant(false, globalState.strictMode
? getMessage("m030")
:getMessage("m031")
: getMessage("m031")
);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/utils/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const messages = {
"m036" : "It is not possible to get index atoms from arrays" ,
"m037" : "\nHi there! I'm sorry you have just run into an exception.\n\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\n\n However, more interesting is the actual stack trace of the error itself.\n Hopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\n See \`error.stack\` property, or press the very subtle \"(...)\" link you see near the console.error message that probably brought you here.\n That stack is more interesting than the stack of this console.error itself.\n\n If the exception you see is an exception you created yourself, make sure to use \`throw new Error(\"Oops\")\` instead of \`throw \"Oops\"\`,\n because the javascript environment will only preserve the original stack trace in the first form.\n\n You can also make sure the debugger pauses the next time this very same exception is thrown by enabling \"Pause on caught exception\".\n (Note that it might pause on many other, unrelated exception as well).\n\n If that all doesn't help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\n",
"m038" : "Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.",

}

export function getMessage(id : string) {
Expand Down

0 comments on commit 9f8cdab

Please sign in to comment.