fix missing null cases
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
(set block.output outputBlock)
|
(set block.output outputBlock)
|
||||||
(set block.outputStart outputStartPosition)
|
(set block.outputStart outputStartPosition)
|
||||||
(set block.outputEnd outputEndPosition)))
|
(set block.outputEnd outputEndPosition)))
|
||||||
(None
|
(otherwise
|
||||||
(break)))
|
(break)))
|
||||||
(elements.push (Block block))))
|
(elements.push (Block block))))
|
||||||
elements))
|
elements))
|
||||||
|
@@ -46,7 +46,7 @@
|
|||||||
})))
|
})))
|
||||||
((objectWith [type "find"] text)
|
((objectWith [type "find"] text)
|
||||||
(_find text))
|
(_find text))
|
||||||
(otherType (throw "bad message $event for KTxt2Editor"))))
|
(otherwise (throw "bad message $event for KTxt2Editor"))))
|
||||||
|
|
||||||
(window.addEventListener "scroll"
|
(window.addEventListener "scroll"
|
||||||
->(let [s (getState)]
|
->(let [s (getState)]
|
||||||
@@ -399,10 +399,9 @@
|
|||||||
(content.appendChild topLink)))
|
(content.appendChild topLink)))
|
||||||
(doFor [idx element] (.slice (collect (enumerate ktxt2Elements)) elementScrollY (+ elementScrollY PAGE_SIZE))
|
(doFor [idx element] (.slice (collect (enumerate ktxt2Elements)) elementScrollY (+ elementScrollY PAGE_SIZE))
|
||||||
(case element
|
(case element
|
||||||
((Comment (objectWith text))
|
|
||||||
(throw "comments are no longer a feature!"))
|
|
||||||
((Block (objectWith source output outputLocked))
|
((Block (objectWith source output outputLocked))
|
||||||
(blockElements source output outputLocked idx))))
|
(blockElements source output outputLocked idx))
|
||||||
|
(otherwise (throw "shouldn't happen"))))
|
||||||
(when (> (- ktxt2Elements.length 1) (+ elementScrollY SCROLL_AMOUNT))
|
(when (> (- ktxt2Elements.length 1) (+ elementScrollY SCROLL_AMOUNT))
|
||||||
(let [downLink (document.createElement "a")
|
(let [downLink (document.createElement "a")
|
||||||
bottomLink (document.createElement "a")]
|
bottomLink (document.createElement "a")]
|
||||||
|
Reference in New Issue
Block a user