diff --git a/assets/js/customizer.js b/assets/js/customizer.js
index c5cfedd992f99d8cf9e4b215ab69efba974f8995..e1d7507e0b8b8107ea03084e32bd051d6817bd04 100644
--- a/assets/js/customizer.js
+++ b/assets/js/customizer.js
@@ -34,8 +34,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
       dataType: 'json',
       data: JSON.stringify(data)
     })
-    .success(function(err) {
-      history.replaceState(false, document.title, window.location.origin + window.location.pathname + '?id=' + e.id)
+    .success(function(result) {
+      history.replaceState(false, document.title, window.location.origin + window.location.pathname + '?id=' + result.id)
     })
     .error(function(err) {
       showError('<strong>Error</strong> Could not save gist file, configuration not saved.', err)