From 22d4a7690f9931bffe1a9bf17e25e5d60fa16753 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 3 Feb 2013 21:42:06 -0800 Subject: [PATCH] Make Closure Compiler bug fix to work with `!1`. Former-commit-id: 2d82a0a8d71d8fc3907bf5f71b5ab41ed4142c04 --- build/post-compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/post-compile.js b/build/post-compile.js index acc9c67a3..db56866f8 100644 --- a/build/post-compile.js +++ b/build/post-compile.js @@ -30,7 +30,7 @@ // correct overly aggressive Closure Compiler advanced optimizations source = source .replace(/prototype\s*=\s*{\s*valueOf\s*:\s*1\s*}/, 'prototype={valueOf:1,y:1}') - .replace(/(document[^&]+&&)\s*\w+/, '$1!({toString:0}+"")'); + .replace(/(document[^&]+&&)\s*(?:\w+|!\d)/, '$1!({toString:0}+"")'); // flip `typeof` expressions to help optimize Safari and // correct the AMD module definition for AMD build optimizers