From 26ac7f0f1d532d27b6e0ebd74b1a0e44f9d5a239 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind1991@gmail.com>
Date: Thu, 11 Aug 2011 16:53:00 +0200
Subject: [PATCH] get rid of some js errors on the login screen

---
 apps/media/js/loader.js | 1 +
 core/js/js.js           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/media/js/loader.js b/apps/media/js/loader.js
index b7ef2fb7be..ef8647eeca 100644
--- a/apps/media/js/loader.js
+++ b/apps/media/js/loader.js
@@ -49,6 +49,7 @@ $(document).ready(function() {
 		FileActions.setDefault('audio','Play');
 		FileActions.setDefault('application/ogg','Play');
 	}
+	var oc_current_user=OC.currentUser;
 	if(typeof PlayList==='undefined'){
 		if(typeof localStorage !== 'undefined' && localStorage){
 			if(localStorage.hasOwnProperty(oc_current_user+'oc_playlist_items') && localStorage.getItem(oc_current_user+'oc_playlist_items')!='[]' && localStorage.getItem(oc_current_user+'oc_playlist_active')!='true'){
diff --git a/core/js/js.js b/core/js/js.js
index dc8345545a..dd3f3b2ac3 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -27,7 +27,7 @@ t.cache={};
 
 OC={
 	webroot:oc_webroot,
-	currentUser:oc_current_user,
+	currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false,
 	coreApps:['files','admin','log','search','settings','core','3rdparty'],
 	/**
 	 * get an absolute url to a file in an appen
-- 
GitLab