Skip to content

Commit 91746ae

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
[cleanup] Remove unnecessary code
This code is obsolete with the current typings Bug: none Change-Id: I91d93df5a8053442af5c306abba7efaa9a1074d9 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6276554 Auto-Submit: Nikolay Vitkov <[email protected]> Commit-Queue: Alex Rudenko <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]> Reviewed-by: Alex Rudenko <[email protected]>
1 parent 746bbd8 commit 91746ae

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

front_end/core/sdk/CSSModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export class CSSModel extends SDKModel<EventTypes> {
368368

369369
const payload = {
370370
cssModel: this,
371-
node: (node as DOMNode),
371+
node,
372372
inlinePayload: matchedStylesResponse.inlineStyle || null,
373373
attributesPayload: matchedStylesResponse.attributesStyle || null,
374374
matchedPayload: matchedStylesResponse.matchedCSSRules || [],

front_end/core/sdk/DOMModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ export class DOMModel extends SDKModel<EventTypes> {
12681268
async pushNodeToFrontend(objectId: Protocol.Runtime.RemoteObjectId): Promise<DOMNode|null> {
12691269
await this.requestDocument();
12701270
const {nodeId} = await this.agent.invoke_requestNode({objectId});
1271-
return nodeId ? this.nodeForId(nodeId) : null;
1271+
return this.nodeForId(nodeId);
12721272
}
12731273

12741274
pushNodeByPathToFrontend(path: string): Promise<Protocol.DOM.NodeId|null> {

front_end/panels/elements/ElementsPanel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
617617
if (savedSelectedNodeOnReset !== this.selectedNodeOnReset) {
618618
return;
619619
}
620-
let node: (SDK.DOMModel.DOMNode|null) = restoredNodeId ? domModel.nodeForId(restoredNodeId) : null;
620+
let node = domModel.nodeForId(restoredNodeId);
621621
if (!node) {
622622
const inspectedDocument = domModel.existingDocument();
623623
node = inspectedDocument ? inspectedDocument.body || inspectedDocument.documentElement : null;

0 commit comments

Comments
 (0)