Skip to content

Commit

Permalink
Destructure deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywiebe committed Dec 18, 2023
1 parent 71576ef commit ecb6ac7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/perseus/src/components/graphie-movables.ts
Original file line number Diff line number Diff line change
@@ -125,14 +125,14 @@ const Label: any = GraphieClasses.createSimpleClass((graphie, props) => {
coord = graphie.unscalePoint(coord);
}
let elem = null;
const deps = getDependencies();
const {JIPT} = getDependencies();

// If the label is rendered for a locale other than "en", push the label
// element to an array. This array is used to lookup the label element
// and processed with jipt('just in place translation', crowdin specific
// program) to replace the passed in crowdin string with the translated
// string. For "en" locale, the jipt processing is skipped.
if (deps.JIPT.useJIPT) {
if (JIPT.useJIPT) {
elem = graphie.label(
coord,
props.text,
@@ -141,7 +141,7 @@ const Label: any = GraphieClasses.createSimpleClass((graphie, props) => {
props.style,
);

deps.JIPT.graphieMovablesJiptLabels.addLabel(elem, props.tex);
JIPT.graphieMovablesJiptLabels.addLabel(elem, props.tex);

Check warning on line 144 in packages/perseus/src/components/graphie-movables.ts

Codecov / codecov/patch

packages/perseus/src/components/graphie-movables.ts#L144

Added line #L144 was not covered by tests
} else {
elem = graphie.label(
coord,

0 comments on commit ecb6ac7

Please sign in to comment.