Skip to content

Commit

Permalink
Merge pull request #14851 from intercom/gj/debug-only-log-view-lookups
Browse files Browse the repository at this point in the history
[BUGFIX beta] only `LOG_VIEW_LOOKUPS` in debug
  • Loading branch information
rwjblue authored Jan 20, 2017
2 parents 9cbf9f3 + cd7707e commit b166832
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/ember-routing/lib/system/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
isNone,
computed,
run,
runInDebug,
isEmpty
} from 'ember-metal';
import {
Expand Down Expand Up @@ -2299,10 +2300,12 @@ function buildRenderOptions(route, namePassed, isDefaultRender, _name, options)

assert(`Could not find "${name}" template, view, or component.`, isDefaultRender || template);

let LOG_VIEW_LOOKUPS = get(route.router, 'namespace.LOG_VIEW_LOOKUPS');
if (LOG_VIEW_LOOKUPS && !template) {
info(`Could not find "${name}" template. Nothing will be rendered`, { fullName: `template:${name}` });
}
runInDebug(() => {
let LOG_VIEW_LOOKUPS = get(route.router, 'namespace.LOG_VIEW_LOOKUPS');
if (LOG_VIEW_LOOKUPS && !template) {
info(`Could not find "${name}" template. Nothing will be rendered`, { fullName: `template:${name}` });
}
});

return renderOptions;
}
Expand Down

0 comments on commit b166832

Please sign in to comment.