Committer: sbelyaev
LJSUP-13301: Main page optimizationU trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/weblib.pl =================================================================== --- trunk/cgi-bin/weblib.pl 2012-08-16 10:57:18 UTC (rev 22673) +++ trunk/cgi-bin/weblib.pl 2012-08-16 12:12:29 UTC (rev 22674) @@ -1355,16 +1355,18 @@ die "Bogus reskey $reskey" unless $reskey =~ m!^(js|stc)/!; unless (exists $LJ::NEEDED_RES{$reskey}) { - push @reskeys => $reskey; + push @reskeys, $reskey; } $LJ::NEEDED_RES{$reskey} = $resopts; } - if ($insert_head) { - unshift @LJ::NEEDED_RES, @reskeys; - } else { - push @LJ::NEEDED_RES, @reskeys; - } + if (@reskeys) { + if ($insert_head) { + unshift @LJ::NEEDED_RES, @reskeys; + } else { + push @LJ::NEEDED_RES, @reskeys; + } + } } sub include_raw {