Skip to content

Commit

Permalink
fix: issue with root translator running in hydrate mode
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jul 24, 2021
1 parent f49fc19 commit 56495ae
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/compiler/src/babel-plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ export default (api, markoOpts) => {
file.___taglibLookup = taglibLookup;
file.___getMarkoFile = getMarkoFile;

for (const id in taglibLookup.taglibsById) {
addPlugin(
metadata.marko,
rootTranslators,
taglibLookup.taglibsById[id].translator
);
if (markoOpts.output !== "hydrate") {
for (const id in taglibLookup.taglibsById) {
addPlugin(
metadata.marko,
rootTranslators,
taglibLookup.taglibsById[id].translator
);
}
}

rootTranslators.push(translator.translate);
Expand Down

0 comments on commit 56495ae

Please sign in to comment.