From 526af42e068cb58fcaf4575edbab5629494c38e0 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 24 Mar 2015 13:43:20 -0500
Subject: [PATCH] lock: Disable navigation warning if not using the lock
 feature

---
 scp/js/ticket.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scp/js/ticket.js b/scp/js/ticket.js
index fd6064aec..bce07d154 100644
--- a/scp/js/ticket.js
+++ b/scp/js/ticket.js
@@ -64,7 +64,7 @@ var autoLock = {
             autoLock.renewLock(e);
         }
 
-        if(!autoLock.lasteventTime) { //I hate nav away warnings..but
+        if(autoLock.lockId && !autoLock.lasteventTime) { //I hate nav away warnings..but
             $(document).on('pjax:beforeSend.changed', function(e) {
                 return confirm(__("Any changes or info you've entered will be discarded!"));
             });
-- 
GitLab