Skip to content

Commit

Permalink
fixed little bug in loading of sample map into Context (not sure if b…
Browse files Browse the repository at this point in the history
…ug had any actual consequences other than error message)
  • Loading branch information
dktr0 committed Jan 12, 2019
1 parent 52b6081 commit e4101a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ releaseClient: # make installClient or prodInstallClient first!

curlReleaseClient: # this uses curl to download and unzip a recent pre-built client from a GitHub release
rm -rf Estuary.jsexe
curl -o temp.zip -L https://github.com/d0kt0r0/estuary/releases/download/20190111/estuary-client-20190111.zip
curl -o temp.zip -L https://github.com/d0kt0r0/estuary/releases/download/20190111b/estuary-client-20190111b.zip
unzip temp.zip
rm -rf temp.zip
cp -Rf static/samples Estuary.jsexe
Expand Down
6 changes: 3 additions & 3 deletions client/src/Estuary/Types/Samples.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ instance JSON SampleMap where
showJSON map = JSON.encJSDict $ Map.toList $ unSampleMap $ map

defaultSampleMapURL :: JSString
defaultSampleMapURL = "WebDirt/sampleMap.json"
defaultSampleMapURL = "samples/sampleMap.json"

loadSampleMapAsync :: (ToJSString url) => url -> (Maybe SampleMap -> IO ()) -> IO ()
loadSampleMapAsync url onLoad = do
Expand All @@ -68,10 +68,10 @@ loadSampleMapAsync url onLoad = do
-- TODO should this not be connected to webdirt?
foreign import javascript safe
"var xhr = new XMLHttpRequest(); \n\
\xhr.open('GET', $1, true); \n\
\xhr.open('GET', $1, true); \n\
\xhr.responseType = 'text'; \n\
\xhr.onload = function() { $2(xhr.response); }; \n\
\xhr.onabort = function() { $2(null); }; \n\
\xhr.onerror = function() { $2(null); }; \n\
\xhr.send(); "
js_loadSamplesAsync :: JSString -> Callback (JSVal -> IO ()) -> IO ()
js_loadSamplesAsync :: JSString -> Callback (JSVal -> IO ()) -> IO ()
2 changes: 1 addition & 1 deletion client/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ packages:

- location:
git: https://github.com/d0kt0r0/Punctual.git
commit: d9ebad5f1dbc8b1935522200c1f03f0824c93a72
commit: a4d274718d54d0b22ef602b300320fa0ba50376a
extra-dep: true

extra-deps:
Expand Down

0 comments on commit e4101a0

Please sign in to comment.