mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(devtools): show more meaningful warning message to help us debug cases
This commit is contained in:
+2
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user