diff options
author | cash <cash.costello@gmail.com> | 2011-11-18 22:28:18 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-28 21:44:00 -0500 |
commit | be4488de483e87d91a231ca06f5639861d4d14b3 (patch) | |
tree | 4c757bd8e95cb9dd51e93368335a090675bb47e6 /js | |
parent | 0dfd397892c24a55791517e7e9b006fd635e87d8 (diff) | |
download | elgg-be4488de483e87d91a231ca06f5639861d4d14b3.tar.gz elgg-be4488de483e87d91a231ca06f5639861d4d14b3.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; + } }; |