diff --git a/build.js b/build.js index 5fc23de7d..4e8accb1c 100755 --- a/build.js +++ b/build.js @@ -1272,8 +1272,8 @@ // replace `_.keys` with `shimKeys` if (!isRemoved(source, 'keys')) { source = source.replace( - matchFunction(source, 'keys').replace(/[\s\S]+?var keys *=/, ''), - matchFunction(source, 'shimKeys').replace(/[\s\S]+?var shimKeys *=/, '') + matchFunction(source, 'keys').replace(/[\s\S]+?var keys *= */, ''), + matchFunction(source, 'shimKeys').replace(/[\s\S]+?function shimKeys/, 'function').replace(/}\n$/, '};\n') ); source = removeFunction(source, 'shimKeys');