From 25e4a071ef3f89a5573f1d67b0c3cb60ccf7c858 Mon Sep 17 00:00:00 2001
From: Bernhard Posselt <nukeawhale@gmail.com>
Date: Thu, 15 Nov 2012 15:01:21 +0100
Subject: [PATCH] fixed: this.routes_request is a deferred/promise

---
 core/js/router.js | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/core/js/router.js b/core/js/router.js
index 406f1912fe..77168e3302 100644
--- a/core/js/router.js
+++ b/core/js/router.js
@@ -4,11 +4,7 @@ OC.Router = {
 	// register your ajax requests to load after the loading of the routes
 	// has finished. otherwise you face problems with race conditions
 	registerLoadedCallback: function(callback){
-		if(this.routes_request.state() === 'resolved'){
-			callback();
-		} else {
-			this.loadedCallback = callback;
-		}
+		this.routes_request.done(callback);
 	},
 	routes_request: $.ajax(OC.router_base_url + 'core/routes.json', {
 		dataType: 'json',
-- 
GitLab