Created
August 9, 2012 16:23
-
-
Save kennyp/3305607 to your computer and use it in GitHub Desktop.
Carzyness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/themes/comporium/js/sales.js b/themes/comporium/js/sales.js | |
index 95e84f6..3c47286 100644 | |
--- a/themes/comporium/js/sales.js | |
+++ b/themes/comporium/js/sales.js | |
@@ -201,10 +201,15 @@ var init = function ($, Complete, Cart, queue) { | |
this.registerEvents(); | |
$('script[type="text/underscore-template"]').forEach(function (t) { | |
- var pn = $(t).parent(), | |
+ var parNo = t.parentNode, | |
render = $.template(t.innerHTML); | |
templates[functionify(t.id)] = function (obj) { | |
- pn.html(render(obj)); | |
+ var out = render(obj); | |
+ try { | |
+ parNo.innerHTML = out; | |
+ } catch (e) { | |
+ $(parNo).html(out); | |
+ } | |
}; | |
}); | |
templates.checkoutButton = function (totals) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment