Skip to content

Commit

Permalink
Processed own review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Feb 2, 2017
1 parent a456fa9 commit 333398b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/core/action.ts
Expand Up @@ -40,9 +40,6 @@ interface IActionRunInfo {
}

function startAction(actionName: string, fn: Function, scope: any, args?: IArguments): IActionRunInfo {
// actions should not be called from computeds. check only works if the computed is actively observed, but that is fine enough as heuristic
// however, this is mainly a best practice / anti-pattern, see #798, for example.
// 26-1-17, Disabling the message for now (MobX > 3.0.2)
const notifySpy = isSpyEnabled() && !!actionName;
let startTime: number = 0;
if (notifySpy) {
Expand Down
1 change: 0 additions & 1 deletion src/utils/messages.ts
Expand Up @@ -27,7 +27,6 @@ const messages = {
"m026" : "`action` can only be invoked on functions" ,
"m028" : "It is not allowed to set `useStrict` when a derivation is running" ,
"m029" : "INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row" ,
"m030" : "Since strict-mode is enabled, changing observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: " ,
"m030a" : "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: " ,
"m030b" : "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: " ,
"m031" : "Computed values are not allowed to not cause side effects by changing observables that are already being observed. Tried to modify: ",
Expand Down

0 comments on commit 333398b

Please sign in to comment.