mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
fix clone issue
This commit is contained in:
parent
b087470cdc
commit
e646677554
@ -225,7 +225,11 @@ function hasNonSimpleChildren(node) {
|
||||
|
||||
function convertHtmlToReact(node, context) {
|
||||
if (node.type === 'tag') {
|
||||
context = _.cloneDeep(context);
|
||||
context = {
|
||||
boundParams: _.clone(context.boundParams),
|
||||
injectedFunctions: context.injectedFunctions,
|
||||
html: context.html
|
||||
};
|
||||
|
||||
var data = {name: convertTagNameToConstructor(node.name)};
|
||||
if (node.attribs[scopeProp]) {
|
||||
|
@ -81,10 +81,10 @@ test('util.isStale', function (t) {
|
||||
var mtime2 = new Date(1995, 11, 17, 3, 24, 1);
|
||||
fs.utimesSync(b, mtime2, mtime2);
|
||||
|
||||
var util = require('../../src/util');
|
||||
var actual = util.isStale(a, b);
|
||||
var util = require('../../src/fsUtil');
|
||||
var actual = fsUtil.isStale(a, b);
|
||||
t.equal(actual, false);
|
||||
actual = util.isStale(b, a);
|
||||
actual = fsUtil.isStale(b, a);
|
||||
t.equal(actual, true);
|
||||
|
||||
fs.unlinkSync(a);
|
||||
|
Loading…
x
Reference in New Issue
Block a user