Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ build-webworker:
.PHONY:go-repl
go-repl:
@echo ":: Building Go interpreter module..." && \
GOOS=js GOARCH=wasm $(GO) build -o $(PUBLIC_DIR)/$(INTERPRETER_WORKER_NAME) $(INTERPRETER_PKG)
GOOS=js GOARCH=wasm $(GO) build -o $(PUBLIC_DIR)/go-repl.wasm $(INTERPRETER_PKG)

.PHONY:build-wasm
build-wasm: copy-wasm-exec build-webworker go-repl
Expand Down
20 changes: 12 additions & 8 deletions web/src/components/preview/Preview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import { MessageBar, MessageBarType } from '@fluentui/react';
import {MessageBar, MessageBarType} from '@fluentui/react';

import ThemeableComponent from '@components/utils/ThemeableComponent';
import { getDefaultFontFamily } from '~/services/fonts';
import { Connect } from '~/store';
import { RuntimeType } from '~/services/config';
import { EvalEvent } from '~/services/api';
import {getDefaultFontFamily} from '~/services/fonts';
import {Connect} from '~/store';
import {RuntimeType} from '~/services/config';
import {EvalEvent} from '~/services/api';
import EvalEventView from './EvalEventView';
import './Preview.css';

Expand All @@ -29,7 +29,9 @@ export default class Preview extends ThemeableComponent<PreviewProps> {

render() {
// Some content should not be displayed in WASM mode (like delay, etc)
const isWasm = this.props.runtime === RuntimeType.WebAssembly;
const isWasm = this.props.runtime === RuntimeType.WebAssembly ||
this.props.runtime === RuntimeType.Interpreter;

let content;
if (this.props.lastError) {
content = (
Expand All @@ -51,8 +53,10 @@ export default class Preview extends ThemeableComponent<PreviewProps> {
/>
));

if (!isWasm) {
content.push(<div className="app-preview__epilogue" key="exit">Program exited.</div>)
if (!isWasm && !this.props.loading) {
content.push(
<div className="app-preview__epilogue" key="exit">Program exited.</div>
);
}
} else {
content = <span>Press "Run" to compile program.</span>;
Expand Down