Skip to content

Commit 2e16c68

Browse files
committed
detect js package by full path, still allow vendoring
1 parent ab917e0 commit 2e16c68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/typesutil/typesutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
func IsJsPackage(pkg *types.Package) bool {
9-
return pkg != nil && strings.HasSuffix(pkg.Path(), "/gopherjs/js")
9+
return pkg != nil && (pkg.Path() == "github.com/gopherjs/gopherjs/js" || strings.HasSuffix(pkg.Path(), "/vendor/github.com/gopherjs/gopherjs/js"))
1010
}
1111

1212
func IsJsObject(t types.Type) bool {

0 commit comments

Comments
 (0)