Replace "Object.assign" (not support in IE) by "util/extend"
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable new-cap */
|
/* eslint-disable new-cap */
|
||||||
|
|
||||||
import Exception from '../exception';
|
import Exception from '../exception';
|
||||||
import {isArray, indexOf} from '../utils';
|
import {isArray, indexOf, extend} from '../utils';
|
||||||
import AST from './ast';
|
import AST from './ast';
|
||||||
|
|
||||||
const slice = [].slice;
|
const slice = [].slice;
|
||||||
@@ -488,7 +488,7 @@ export function compile(input, options = {}, env) {
|
|||||||
throw new Exception('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
|
throw new Exception('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
|
||||||
}
|
}
|
||||||
|
|
||||||
options = Object.assign({}, options);
|
options = extend({}, options);
|
||||||
if (!('data' in options)) {
|
if (!('data' in options)) {
|
||||||
options.data = true;
|
options.data = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user