Skip to content

Commit

Permalink
Fixed double generated file name postfix (#5046)
Browse files Browse the repository at this point in the history
* Fixed double generated file name postfix

* Fixed missing file postfix on imports without reexports
  • Loading branch information
krojew authored and aardappel committed Nov 16, 2018
1 parent f23009f commit d6b1ce0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/idl_gen_js.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,8 @@ class JsGenerator : public BaseGenerator {
const auto basename =
flatbuffers::StripPath(flatbuffers::StripExtension(file.first));
if (basename != file_name_) {
const auto file_name = basename + kGeneratedFileNamePostfix;

if (imported_files.find(file.first) == imported_files.end()) {
code += GenPrefixedImport(file.first, file_name);
code += GenPrefixedImport(file.first, basename);
imported_files.emplace(file.first);
}

Expand Down

0 comments on commit d6b1ce0

Please sign in to comment.