1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 02:58:36 +03:00

Simplify the Diff constructor.

This commit is contained in:
Rob Rix 2015-10-23 18:56:07 -04:00
parent ccc57c6411
commit 00234c1365

View File

@ -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;
}
</script>