Permalink
Browse files

Fix closure compiler bug.

  • Loading branch information...
1 parent 7c1034a commit 6156fcf69f6a76c300e39b93b3dbcf3f0f9dceca @jdalton jdalton committed Jan 17, 2013
Showing with 121 additions and 119 deletions.
  1. +3 −1 build/post-compile.js
  2. +106 −106 doc/README.md
  3. +12 −12 lodash.min.js
View
@@ -31,7 +31,9 @@
source = source.replace(/^((?:(['"])use strict\2;)?(?:var (?:[a-z]+=(?:!0|!1|null)[,;])+)?)([\s\S]*?function[^)]+\){)/, '$3$1');
// correct overly aggressive Closure Compiler advanced optimizations
- source = source.replace(/prototype\s*=\s*{\s*valueOf\s*:\s*1\s*}/, 'prototype={valueOf:1,y:1}');
+ source = source
+ .replace(/prototype\s*=\s*{\s*valueOf\s*:\s*1\s*}/, 'prototype={valueOf:1,y:1}')
+ .replace(/(document[^&]+&&)\s*\w+/, '$1!({toString:0}+"")');
// unescape properties (e.g. foo["bar"] => foo.bar)
source = source.replace(/(\w)\["([^."]+)"\]/g, function(match, left, right) {
Oops, something went wrong.

0 comments on commit 6156fcf

Please sign in to comment.