diff --git a/prototype/UI/index.html b/prototype/UI/index.html
index 8656be8c7..f4f56130c 100644
--- a/prototype/UI/index.html
+++ b/prototype/UI/index.html
@@ -91,10 +91,12 @@
/// Diff -> String -> String -> DOM
function diffToDOM(diff, which, source) {
- return rangeAndSyntaxToDOM(diff.roll.extract[which], diff.roll.unwrap, source, function(diff) {
+ if (diff.pure != null) { return diff.pure; }
+ function getRange(diff) {
if (diff.pure != null) { return diff.pure["data-range"]; }
if (diff.roll != null) { return diff.roll.extract[which]; }
- }, function(diff) { return diffToDOM(diff, which, source); })
+ }
+ return rangeAndSyntaxToDOM(getRange(diff), diff.roll.unwrap, source, getRange, function(diff) { return diffToDOM(diff, which, source); })
}
/// Range -> Syntax a -> String -> (a -> Range) -> (a -> DOM) -> DOM