Skip to content

Commit

Permalink
Switch from let to var for compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorendorff committed Apr 9, 2016
1 parent 7329011 commit f895b60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rga.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ RGA.diff = function diff(s0, s1) {
function find_longest_common_slice(a, b) {
var map_of_b = Object.create(null);
for (var i = 0; i < b.length; i++) {
let ch = b[i];
let list = map_of_b[ch];
var ch = b[i];
var list = map_of_b[ch];
if (list)
list.push(i);
else
Expand Down Expand Up @@ -345,7 +345,7 @@ RGA.diff = function diff(s0, s1) {

function compare(a, b, start, patch) {
if (a !== b) {
let match = find_longest_common_slice(a, b);
var match = find_longest_common_slice(a, b);
if (match.length === 0) {
if (a)
patch.push({delete: a.length});
Expand Down Expand Up @@ -414,7 +414,7 @@ RGA.AceEditorRGA = function AceEditorRGA(id, editor, history, queue) {
RGA.AceEditorRGA.prototype = Object.create(RGA.prototype);
Object.assign(RGA.AceEditorRGA.prototype, {
_assertInSync: function () {
let erText = this.text();
var erText = this.text();
if (this._lastText != erText) {
infodump.lastText = this._lastText;
infodump.rgaText = erText;
Expand Down

0 comments on commit f895b60

Please sign in to comment.