Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmel committed Jan 14, 2021
1 parent dd1b86d commit aa7266c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ export class SelectorCompletionItemProvider implements CompletionItemProvider, D
return workspace.getConfiguration("css", uri).get<string[]>("styleSheets", []);
}

getPath(uri: Uri, spec: string, ext?: string): string {
getPath(uri: Uri, path: string, ext?: string): string {
const folder = workspace.getWorkspaceFolder(uri);
const name = ext ? join(dirname(spec), basename(spec, ext) + ext) : spec;
const name = ext ? join(dirname(path), basename(path, ext) + ext) : path;

return folder
? join(isAbsolute(spec)
? join(isAbsolute(path)
? folder.uri.fsPath
: dirname(uri.fsPath), name)
: join(dirname(uri.fsPath), name);
Expand Down

0 comments on commit aa7266c

Please sign in to comment.