Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ class Repl extends Component {
DEBOUNCE_DELAY
);

_minify = (code, setStateCallback) => {
_minify = async (code, setStateCallback) => {
// we need to clone this because terser mutates the options object :(
const terserOpts = cloneDeep(this.state.terserOptions);

// TODO: put this in a worker to avoid blocking the UI on heavy content
try {
const result = this.props.terser.minify(code, terserOpts);
const result = await this.props.terser.minify(code, terserOpts);

if (result.error) {
this.setState({ errorMessage: result.error.message });
Expand Down