fix: mini repls were broken
This commit is contained in:
parent
28912fff97
commit
4b79a75f39
2 changed files with 7 additions and 11 deletions
|
|
@ -3,10 +3,6 @@ import { evaluate as _evaluate } from './evaluate.mjs';
|
|||
import { logger } from './logger.mjs';
|
||||
import { setTime } from './time.mjs';
|
||||
|
||||
export let scheduler; // expose scheduler to global scope
|
||||
// this is not optimal as it will only work for one repl at a time
|
||||
// TODO: use pattern.context to expose scheduler
|
||||
|
||||
export function repl({
|
||||
interval,
|
||||
defaultOutput,
|
||||
|
|
@ -18,7 +14,7 @@ export function repl({
|
|||
transpiler,
|
||||
onToggle,
|
||||
}) {
|
||||
scheduler = new Cyclist({
|
||||
const scheduler = new Cyclist({
|
||||
interval,
|
||||
onTrigger: async (hap, deadline, duration) => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue