@form-create/utils
Advanced tools
Comparing version 2.5.10 to 2.5.11
@@ -5,3 +5,3 @@ export default function deepSet(data, idx, val) { | ||
if (to) { | ||
if(!_data[to]) { | ||
if (!_data[to] || typeof _data[to] != 'object') { | ||
_data[to] = {} | ||
@@ -15,2 +15,2 @@ } | ||
return _data; | ||
} | ||
} |
@@ -9,2 +9,3 @@ import deepExtend from './deepextend'; | ||
const $T = '$FN:'; | ||
const $TX = '$FNX:'; | ||
const FUNCTION = 'function'; | ||
@@ -37,3 +38,3 @@ | ||
export function parseFn(fn, mode) { | ||
if (fn && is.String(fn)) { | ||
if (fn && is.String(fn) && fn.length > 4) { | ||
let v = fn.trim(); | ||
@@ -48,4 +49,4 @@ let flag = false; | ||
flag = true; | ||
} else if (v.indexOf('$FNX:') === 0) { | ||
v = makeFn('function($inject){' + v.replace('$FNX:', '') + '}'); | ||
} else if (v.indexOf($TX) === 0) { | ||
v = makeFn('function($inject){' + v.replace($TX, '') + '}'); | ||
v.__json = fn; | ||
@@ -62,3 +63,3 @@ v.__inject = true; | ||
} catch (e) { | ||
err(`解析失败:${v}`); | ||
err(`解析失败:${v}\n\nerr: ${e}`); | ||
return undefined; | ||
@@ -65,0 +66,0 @@ } |
{ | ||
"name": "@form-create/utils", | ||
"version": "2.5.10", | ||
"version": "2.5.11", | ||
"description": "", | ||
@@ -31,3 +31,3 @@ "main": "./lib/index.js", | ||
}, | ||
"gitHead": "7c08cb39580a4d60e2c9ec78823b47e9a0c4f115" | ||
"gitHead": "ccd7ba699b3a877c9f2f2ec3c58a808128cee914" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14073
309