Make sure the |options| param passed to passes is always an object

Pass code can be simpler as a result.
redux
David Majda 12 years ago
parent ee1a0b5810
commit 3629d880d3

@ -22,6 +22,8 @@ module.exports = {
* cause its malfunction.
*/
compile: function(ast, options) {
if (options === undefined) { options = {}; }
var that = this;
utils.each(this.appliedPassNames, function(passName) {

@ -2,7 +2,7 @@ var utils = require("../../utils");
/* Generates the parser code. */
module.exports = function(ast, options) {
options = utils.clone(options) || {};
options = utils.clone(options);
utils.defaults(options, {
cache: false,
trackLineAndColumn: false,

Loading…
Cancel
Save