Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
fix: 'fetch module' on work correctly for importmap module
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Mar 2, 2020
1 parent b3b860b commit 087d834
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/src/language/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { localize } from "vscode-nls-i18n";
import { Bridge } from "../bridge";
import { ModuleResolver } from "../../../core/module_resolver";
import { pathExists } from "../../../core/util";
import { ImportMap } from "../../../core/import_map";

type Fix = {
title: string;
Expand Down Expand Up @@ -225,8 +226,8 @@ export class Diagnostics {
) {
const moduleName = resolvedModule
? resolvedModule.origin
: moduleNode.text;
const isRemote = /^https:\/\//.test(moduleName);
: ImportMap.create(importMapFilepath).resolveModule(moduleNode.text);
const isRemote = /^https?:\/\//.test(moduleName) === true;
diagnosticsForThisDocument.push(
Diagnostic.create(
range,
Expand Down

0 comments on commit 087d834

Please sign in to comment.