From 51a5d1659a665a38760fb21727d94731d724fba6 Mon Sep 17 00:00:00 2001 From: Alexander Werner Date: Mon, 6 Mar 2017 19:48:59 +0100 Subject: [PATCH] updated modal code --- billard/templates/billard/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/billard/templates/billard/index.html b/billard/templates/billard/index.html index eb6b40e..398718e 100644 --- a/billard/templates/billard/index.html +++ b/billard/templates/billard/index.html @@ -33,8 +33,10 @@ $(document).ready(function() { function refresh_page() { $('#desk_data').load('#'); $('#modal-wrapper').load('{% url 'accountmodal' %}', function() { - window.clearInterval(interval); - $('#accountsmodal').modal('show'); + if ( $('#accountsmodal').length ) { + window.clearInterval(interval); + $('#accountsmodal').modal('show'); + } }); }