Bug 1440740 - Calling PropTypes validators directly is not supported when first opening Memory Tool r?nchevobbe
Fix eslint errors (unused vars)
MozReview-Commit-ID: IunuZlHIY1S
--- a/devtools/client/memory/models.js
+++ b/devtools/client/memory/models.js
@@ -377,17 +377,17 @@ let previousViewModel = exports.previous
// The previous diffing state, if any.
diffing: diffingModel,
// The previously selected snapshot, if any.
selected: snapshotId,
});
-let viewModel = exports.view = PropTypes.shape({
+exports.view = PropTypes.shape({
// The current view state.
state: catchAndIgnore(function (view) {
switch (view.state) {
case viewState.DIFFING:
case viewState.CENSUS:
case viewState.DOMINATOR_TREE:
case viewState.INDIVIDUALS:
case viewState.TREE_MAP:
@@ -481,18 +481,16 @@ exports.app = {
// If present, the current diffing state.
diffing: diffingModel,
// If present, the current individuals state.
individuals: individualsModel,
// The current type of view.
view: function (app) {
- viewModel.isRequired(app, "view");
-
catchAndIgnore(function (app) {
switch (app.view.state) {
case viewState.DIFFING:
assert(app.diffing, "Should be diffing");
break;
case viewState.INDIVIDUALS:
case viewState.CENSUS: