mirror of
https://github.com/srid/ema.git
synced 2024-12-01 23:23:42 +03:00
Fix JS syntax bug
This commit is contained in:
parent
bf929dec72
commit
ebb9b5db40
@ -3,14 +3,11 @@
|
||||
|
||||
module Ema.Asset where
|
||||
|
||||
-- | The type of assets produced by Ema.
|
||||
-- | The type of assets that can be bundled in a static site.
|
||||
data Asset a
|
||||
= -- | A static file that is copied as-is from the source directory.
|
||||
= -- | A file that is copied as-is from the source directory.
|
||||
AssetStatic FilePath
|
||||
| -- | A file whose contents are generated by user code.
|
||||
--
|
||||
-- If the the file is HTML, then use `Just Html` to inform Ema's live server
|
||||
-- of its nature.
|
||||
| -- | A file whose contents are generated at runtime by user code.
|
||||
AssetGenerated Format a
|
||||
deriving (Eq, Show, Ord, Generic)
|
||||
|
||||
|
@ -281,7 +281,7 @@ wsClientShim =
|
||||
|
||||
ws.onmessage = evt => {
|
||||
console.log("ema: ✍ Patching DOM")
|
||||
if evt.data.startsWith("REDIRECT ") {
|
||||
if (evt.data.startsWith("REDIRECT ")) {
|
||||
document.location.href = evt.data.str.slice("REDIRECT ".length);
|
||||
} else {
|
||||
setHtml(document.documentElement, evt.data);
|
||||
|
Loading…
Reference in New Issue
Block a user