Permalink
Browse files

Avoid causing reload due to partials loaded with Ajax requests

  • Loading branch information...
1 parent 4c19e39 commit 7752888e559d0c25eaee93f81ac357e406b084fe @amol- amol- committed Sep 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 tgext/debugbar/sections/inventing.py
@@ -66,7 +66,7 @@ def on_after_render(response, *args, **kw):
pos_body = page.find('</body>', pos_head + 7)
if pos_body > 0:
response['response'] = ''.join([page[:pos_head],
- Markup('<script>var tgext_debugbar_page_hash="%s";</script>' % m),
+ Markup('<script>if(typeof tgext_debugbar_page_hash === "undefined") window.tgext_debugbar_page_hash="%s";</script>' % m),
page[pos_head:pos_body],
page[pos_body:]])

0 comments on commit 7752888

Please sign in to comment.