dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Remove contentSub from layout when empty"
[lhc/web/wiklou.git]
/
includes
/
libs
/
JavaScriptMinifier.php
diff --git
a/includes/libs/JavaScriptMinifier.php
b/includes/libs/JavaScriptMinifier.php
index
cb282eb
..
141a515
100644
(file)
--- a/
includes/libs/JavaScriptMinifier.php
+++ b/
includes/libs/JavaScriptMinifier.php
@@
-565,10
+565,13
@@
class JavaScriptMinifier {
$out .= ' ';
$lineLength++;
}
$out .= ' ';
$lineLength++;
}
- if( $token === 'true' ) {
- $token = '!0';
- } elseif( $token === 'false' ) {
- $token = '!1';
+ if (
+ $type === self::TYPE_LITERAL
+ && ( $token === 'true' || $token === 'false' )
+ && ( $state === self::EXPRESSION || $state === self::PROPERTY_EXPRESSION )
+ && $last !== '.'
+ ) {
+ $token = ( $token === 'true' ) ? '!0' : '!1';
}
$out .= $token;
}
$out .= $token;