5493: (thanks to tom) modal paging is awesome.
[arvados.git] / apps / workbench / app / assets / javascripts / angular_shim.js
index 72729cdc0abd9bed822d362b0fd5944688520a00..976d09b28e7e47eb252e18172c0601acb42e1448 100644 (file)
@@ -3,10 +3,11 @@
 // arv:pane:loaded event after updating the DOM.
 
 $(document).on('arv:pane:loaded', function(event, $updatedElement) {
-    if (angular && $updatedElement) {
-        angular.element($updatedElement).injector().invoke(function($compile) {
-            var scope = angular.element($updatedElement).scope();
-            $compile($updatedElement)(scope);
-        });
+    if (angular && $updatedElement && angular.element($updatedElement).injector()) {
+        angular.element($updatedElement).injector().invoke([
+            '$compile', function($compile) {
+                var scope = angular.element($updatedElement).scope();
+                $compile($updatedElement)(scope);
+            }]);
     }
 });