Skip to content

Commit

Permalink
feat: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
fyangstudio committed Nov 30, 2021
1 parent 748b4fd commit 57824ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/cssNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ export class CSSNavigation {

protected async resolveRelativeReference(ref: string, documentUri: string, documentContext: DocumentContext, isRawLink?: boolean): Promise<string | undefined> {
const relativeReference = documentContext.resolveReference(ref, documentUri);

// Following [css-loader](https://github.com/webpack-contrib/css-loader#url)
// and [sass-loader's](https://github.com/webpack-contrib/sass-loader#imports)
// convention, if an import path starts with ~ then use node module resolution
Expand All @@ -325,7 +326,7 @@ export class CSSNavigation {
if (relativeReference && await this.fileExists(relativeReference)) {
return relativeReference;
} else {
return await this.resolveModuleReference(ref, documentUri, documentContext);
return await this.resolveModuleReference(ref, documentUri, documentContext) || relativeReference;
}
}

Expand Down

0 comments on commit 57824ae

Please sign in to comment.