mirror of
https://github.com/ritz078/transform.git
synced 2026-11-22 17:11:32 +03:00
fix errors
This commit is contained in:
1 parent
cebbbbb0b6
commit
be6ebb9590
1 file changed
+6
-2
@@ -169,9 +169,13 @@ export default class ConversionPanel extends PureComponent {
|
||||
copyCode = () => {
|
||||
const { rightMode } = this.props;
|
||||
const { resultValue } = this.state;
|
||||
const parser = prettierParsers[rightMode]
|
||||
|
||||
copy(
|
||||
rightMode !== "rust"
|
||||
? js_beautify(resultValue, { e4x: true })
|
||||
parser
|
||||
? prettier.format(resultValue, {
|
||||
parser
|
||||
})
|
||||
: resultValue
|
||||
);
|
||||
this.setState({
|
||||
|
||||
Reference in new issue
Block a user