refactor(devtools): show more meaningful warning message to help us debug cases

This commit is contained in:
mgechev
2020-03-11 16:26:13 -07:00
committed by Minko Gechev
parent 8cb4119e25
commit 387b2f34fd
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -18,7 +18,8 @@
"cy:run:watch": "ng serve & wait-on http://localhost:4200 && $(npm bin)/cypress open",
"test:backend": "ng test ng-devtools-backend --watch=false",
"test:devtools": "ng test ng-devtools --watch=false",
"test:ci": "npm run test:backend && npm run test:devtools",
"test:shared-utils": "ng test shared-utils --watch=false",
"test:ci": "npm run test:backend && npm run test:devtools && npm run test:shared-utils",
"prettier": "prettier --write \"{,!(node_modules|dist|build|coverage)/**/}*.{js,jsx,ts,tsx,json}\"",
"prettier:fix": "pretty-quick --staged"
},
@@ -123,7 +123,7 @@ const insertElementProfile = (frames: ElementProfile[], position: ElementPositio
const pos = position[i];
if (!frames[pos]) {
// TODO(mgechev): consider how to ensure we don't hit this case
console.warn('Unable to find parent node for', original);
console.warn('Unable to find parent node for', profile, original);
return;
}
frames = frames[pos].children;
@@ -149,7 +149,7 @@ const insertElementProfileAtEnd = (frames: ElementProfile[], position: ElementPo
const pos = position[i];
if (!frames[pos]) {
// TODO(mgechev): consider how to ensure we don't hit this case
console.warn('Unable to find parent node for', frames);
console.warn('Unable to find parent node for', profile);
return;
}
frames = frames[pos].children;