Merge pull request #11366 from Bouncey/fix/NoLoopProtectErrorInOutput

Add loopProtect error object
This commit is contained in:
Berkeley Martinez
2016-10-27 09:54:16 -07:00
committed by GitHub

View File

@ -10,12 +10,12 @@ import { updateContents } from '../../common/utils/polyvinyl';
const babelOptions = { presets: [ presetEs2015, presetReact ] };
loopProtect.hit = function hit(line) {
var err = 'Error: Exiting potential infinite loop at line ' +
var err = 'Exiting potential infinite loop at line ' +
line +
'. To disable loop protection, write: \n\\/\\/ noprotect\nas the first' +
'line. Beware that if you do have an infinite loop in your code' +
'. To disable loop protection, write: \n\/\/ noprotect\nas the first ' +
'line. Beware that if you do have an infinite loop in your code, ' +
'this will crash your browser.';
console.error(err);
throw new Error(err);
};
const transformersForHtmlJS = {