From fe2da5533dce7c2d6d83e42924bf6a75257e00ed Mon Sep 17 00:00:00 2001 From: Conduitry Date: Wed, 20 Mar 2019 12:58:52 -0400 Subject: [PATCH] site: make main REPL use relaxed sandbox when loading from example --- site/src/routes/repl/index.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/site/src/routes/repl/index.svelte b/site/src/routes/repl/index.svelte index 4f3a4f9f7c..655b8144a8 100644 --- a/site/src/routes/repl/index.svelte +++ b/site/src/routes/repl/index.svelte @@ -23,6 +23,7 @@ let gist; let name = 'loading...'; let zen_mode = false; + let relaxed = false; $: if (typeof history !== 'undefined') { const params = []; @@ -48,6 +49,7 @@ } if (gist_id) { + relaxed = false; fetch(`gist/${gist_id}`).then(r => r.json()).then(data => { gist = data; const { id, description, files } = data; @@ -88,6 +90,7 @@ function load_example(slug) { console.log(`loading ${slug}`); + relaxed = true; fetch(`examples/${slug}.json`).then(async response => { if (response.ok) { const data = await response.json(); @@ -171,6 +174,6 @@ /> {#if process.browser} - + {/if}