You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by hu...@apache.org on 2016/02/08 14:20:19 UTC

svn commit: r1729167 - /steve/trunk/pysteve/www/htdocs/js/steve_stv.js

Author: humbedooh
Date: Mon Feb  8 13:20:19 2016
New Revision: 1729167

URL: http://svn.apache.org/viewvc?rev=1729167&view=rev
Log:
guard against wrong elements

Modified:
    steve/trunk/pysteve/www/htdocs/js/steve_stv.js

Modified: steve/trunk/pysteve/www/htdocs/js/steve_stv.js
URL: http://svn.apache.org/viewvc/steve/trunk/pysteve/www/htdocs/js/steve_stv.js?rev=1729167&r1=1729166&r2=1729167&view=diff
==============================================================================
--- steve/trunk/pysteve/www/htdocs/js/steve_stv.js (original)
+++ steve/trunk/pysteve/www/htdocs/js/steve_stv.js Mon Feb  8 13:20:19 2016
@@ -300,7 +300,7 @@ function showLines(ev) {
     source = ev.dataTransfer.getData("Text");
     source = source ? source : failover;
     ev.preventDefault();
-    if (ev.target) {
+    if (ev.target && ev.target.getAttribute) {
         var above = false
         dest = ev.target.getAttribute("data")
         var odest = dest;
@@ -666,7 +666,7 @@ function castVotesCallback(code, respons
 
 function touchHandler(event) {
     var touch = event.changedTouches[0];
-    if (!touch.target || !touch.target.getAttribute("data")) {
+    if (!touch.target || !touch.target.getAttribute || !touch.target.getAttribute("data")) {
         return
     }
     var simEvent = document.createEvent("MouseEvent");