Browse Source

Fix error in $.popup

Thibaut Courouble 8 years ago
parent
commit
f9a456cefd
1 changed files with 3 additions and 3 deletions
  1. 3 3
      assets/javascripts/lib/util.coffee

+ 3 - 3
assets/javascripts/lib/util.coffee

@@ -329,11 +329,11 @@ $.requestAnimationFrame = (fn) ->
 $.noop = ->
 
 $.popup = (value) ->
-  win = window.open()
-  if win
+  try
+    win = window.open()
     win.opener = null if win.opener
     win.location = value.href or value
-  else
+  catch
     window.open value.href or value, '_blank'
   return