[K/JS] Fix nameBindings for ES-modules after the ES-modules external declarations optimization
This commit is contained in:
+1
@@ -90,6 +90,7 @@ class JsNameLinkingNamer(
|
||||
else -> JsImport.Target.Default(nameRef)
|
||||
}
|
||||
imports[this] = JsImport(jsModule, importSubject)
|
||||
nameMap[this] = name
|
||||
} else {
|
||||
importedModules += JsImportedModule(jsModule, name, nameRef)
|
||||
}
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ private class JsIrAstSerializer {
|
||||
}
|
||||
|
||||
fun append(fragment: JsIrProgramFragment): JsIrAstSerializer {
|
||||
importedNames += fragment.imports.map { fragment.nameBindings[it.key]!! }
|
||||
importedNames += fragment.imports.map { fragment.nameBindings[it.key] ?: error("No binding for tag ${it.key}") }
|
||||
fragmentSerializer.writeFragment(fragment)
|
||||
return this
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user