Committer: anazarov
LJINT-491: Commenting system works incorrect for side projectsU branches/r98.4/htdocs/js/basic.js
Modified: branches/r98.4/htdocs/js/basic.js =================================================================== --- branches/r98.4/htdocs/js/basic.js 2012-11-14 12:33:12 UTC (rev 23304) +++ branches/r98.4/htdocs/js/basic.js 2012-11-14 13:11:47 UTC (rev 23305) @@ -150,7 +150,7 @@ * @return {*} Returns a page variable or undefined if not found. */ LJ.pageVar = function(name, global) { - var obj = global ? window.Site : window.Site.page; + var obj = global? window.Site : (window.Site || { page: {} }).page; if (obj && obj.hasOwnProperty(name)) { return obj[name]; @@ -2346,7 +2346,7 @@ // we should run code only when document is ready and only for user // that is not currently logged in $(function () { - if (!Site.remoteUser) { + if (window.Site && !window.Site.remoteUser) { // wait for API initialization (inside of livejournal.js) setTimeout(methods.get.bind(methods), 0); }