Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: type issue
  • Loading branch information
balaji-sivasakthi committed Oct 6, 2023
commit cbc6149c5738176bc45c0144a562058415ffd7b1
6 changes: 3 additions & 3 deletions src/services/cssHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class CSSHover {
* Build up the hover by appending inner node's information
*/
let hover: Hover | null = null;
let flagOpts;
let flagOpts:{text:string;isMedia:boolean};

for (let i = 0; i < nodepath.length; i++) {
const node = nodepath[i];
Expand All @@ -48,13 +48,13 @@ export class CSSHover {
const matches = node.getText().match(regex);
flagOpts = {
isMedia:true,
text:matches?.[0]
text:matches?.[0].toString()!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toString()! is not necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I removed it.

};
}

if (node instanceof nodes.Selector) {
hover = {
contents: this.selectorPrinting.selectorToMarkedString(<nodes.Selector>node, flagOpts),
contents: this.selectorPrinting.selectorToMarkedString(<nodes.Selector>node, flagOpts!),
range: getRange(node)
};
break;
Expand Down