diff options
author | cash <cash.costello@gmail.com> | 2011-11-18 22:28:18 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-18 22:28:18 -0500 |
commit | db990aa3c55e9eb79455285d7d0d326974c970e3 (patch) | |
tree | 98b9876832bbfd7f7718812e1fdae9054902bde9 /js | |
parent | 77d6a5b9afe3f6dabfad4bda5d7c735cd48deeec (diff) | |
download | elgg-db990aa3c55e9eb79455285d7d0d326974c970e3.tar.gz elgg-db990aa3c55e9eb79455285d7d0d326974c970e3.tar.bz2 |
Fixes #4093 making sure elgg.page_owner is defined
Diffstat (limited to 'js')
-rw-r--r-- | js/lib/pageowner.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/lib/pageowner.js b/js/lib/pageowner.js index 825898416..c695c41c3 100644 --- a/js/lib/pageowner.js +++ b/js/lib/pageowner.js @@ -6,9 +6,13 @@ */ /** - * @return {number} The GUID of the logged in user + * @return {number} The GUID of the page owner entity or 0 for no owner */ elgg.get_page_owner_guid = function() { - return elgg.page_owner.guid || 0; + if (elgg.page_owner !== undefined) { + return elgg.page_owner.guid; + } else { + return 0; + } }; |