From 00234c1365c2c23fc492df45658296d075c874e8 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 23 Oct 2015 18:56:07 -0400 Subject: [PATCH] Simplify the Diff constructor. --- prototype/UI/index.html | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/prototype/UI/index.html b/prototype/UI/index.html index 794ff2b54..ffe06d93a 100644 --- a/prototype/UI/index.html +++ b/prototype/UI/index.html @@ -162,14 +162,9 @@ } } - function Diff(json) { - if (json.pure != null) { - this.pure = new Patch(json.pure); - } - if (json.roll != null) { - this.ranges = json.roll.extract; - this.roll = new Syntax(json.roll.unwrap, function(x) { return new Diff(x); }); - } + function Diff(object) { + if (object.pure != null) { this.pure = object.pure; } + if (object.roll != null) { this.roll = object.roll; } return this; }