summaryrefslogtreecommitdiff
path: root/os.go
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-26 15:21:15 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-26 15:21:17 -0400
commit7609df9d4f39dec83c633c23833ab8dfd8103ec1 (patch)
tree5e5ae82d2aa6e28d820f1ba76d617b5c1b828a5e /os.go
parentcbfb7d872009f302b69a55693b5c1fbdc731be69 (diff)
Support async/await by including ES2017
This required adjusting the module loading system.
Diffstat (limited to 'os.go')
-rw-r--r--os.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/os.go b/os.go
index 5a96516ea..d1923837e 100644
--- a/os.go
+++ b/os.go
@@ -76,14 +76,18 @@ func HandleCodeFetch(moduleSpecifier string, containingFile string) (out []byte)
return
}
- //println("HandleCodeFetch", "moduleSpecifier", moduleSpecifier,
- // "containingFile", containingFile, "filename", filename)
+ logDebug("HandleCodeFetch moduleSpecifier %s containingFile %s filename %s",
+ moduleSpecifier, containingFile, filename)
if isRemote(moduleName) {
sourceCodeBuf, err = FetchRemoteSource(moduleName, filename)
} else if strings.HasPrefix(moduleName, assetPrefix) {
f := strings.TrimPrefix(moduleName, assetPrefix)
sourceCodeBuf, err = Asset("dist/" + f)
+ if err != nil {
+ logDebug("%s Asset doesn't exist. Return without error", moduleName)
+ err = nil
+ }
} else {
assert(moduleName == filename,
"if a module isn't remote, it should have the same filename")