From 0f8721c5fc60cc06c7ed4d31f682775f668afb5f Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Wed, 30 Apr 2014 18:13:26 -0500 Subject: [PATCH] Fix up redundant re-requesting logic that was broken when GA code was added. Oops --- static/compiler.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/static/compiler.js b/static/compiler.js index 0538a24d..2345e9ac 100644 --- a/static/compiler.js +++ b/static/compiler.js @@ -191,9 +191,10 @@ function Compiler(domRoot, origFilters, windowLocalPrefix, onChangeCallback) { }; setSetting('compiler', data.compiler); setSetting('compilerOptions', data.options); - if (JSON.stringify(data) == JSON.stringify(lastRequest)) return; - data.timestamp = new Date(); // Only after we check for "same as last time" - lastRequest = data; + var stringifiedReq = JSON.stringify(data); + if (stringifiedReq == lastRequest) return; + lastRequest = stringifiedReq; + data.timestamp = new Date(); $.ajax({ type: 'POST', url: '/compile',