Skip to content
This repository was archived by the owner on Feb 17, 2022. It is now read-only.

Commit 01ebd79

Browse files
committed
fix
1 parent eceb295 commit 01ebd79

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rawTextBuilder/components/translateComponent.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import Base from "./rawTextComponent.js";
2+
import RawTextBuilder from "../rawTextBuilder.js";
23

34

45
export default class TranslateComponent extends Base {
56
name = "translate";
67

78
#getWith() {
8-
return this.value.with.map(value => {
9-
if(value instanceof RawTextBuilder) {
10-
return value.build();
11-
}
12-
return value;
13-
});
9+
const [ first, ..._ ] = this.value.with;
10+
if(first instanceof RawTextBuilder) {
11+
return first.build();
12+
}
13+
return this.value.with;
1414
}
1515

1616
build() {

0 commit comments

Comments
 (0)