Prevent previous diff from showing up while rendering the next one

Change-Id: Ic26d9f426bc1e3b9c26856dfbcae7854e22bfffd
This commit is contained in:
Andrew Bonventre
2016-02-11 12:05:51 -05:00
parent 3603eb18c6
commit f761320290

View File

@@ -217,6 +217,14 @@ limitations under the License.
},
reload: function(changeNum, patchRange, path) {
// If a diff takes a considerable amount of time to render, the previous
// diff can end up showing up while the DOM is constructed. Clear the
// content on a reload to prevent this.
this._diff = {
leftSide: [],
rightSide: [],
};
var promises = [
this._prefsReady,
this.$.diffXHR.generateRequest().completes