临时性修复()
This commit is contained in:
@@ -405,8 +405,14 @@ export function lwbAssignVarPath(path, value) {
|
||||
if (globalThis.LWB_Guard?.loadRules) {
|
||||
const res = globalThis.LWB_Guard.loadRules(vParsed, rootName);
|
||||
if (res?.cleanValue !== undefined) vParsed = res.cleanValue;
|
||||
if (res?.rulesDelta && globalThis.LWB_Guard?.applyDelta) {
|
||||
globalThis.LWB_Guard.applyDelta(res.rulesDelta);
|
||||
if (res?.rulesDelta && typeof res.rulesDelta === 'object') {
|
||||
if (globalThis.LWB_Guard?.applyDeltaTable) {
|
||||
globalThis.LWB_Guard.applyDeltaTable(res.rulesDelta);
|
||||
} else if (globalThis.LWB_Guard?.applyDelta) {
|
||||
for (const [p, d] of Object.entries(res.rulesDelta)) {
|
||||
globalThis.LWB_Guard.applyDelta(p, d);
|
||||
}
|
||||
}
|
||||
globalThis.LWB_Guard.save?.();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1329,7 +1329,11 @@ export function rulesLoadFromTree(valueTree, basePath) {
|
||||
String(t).trim().startsWith('$') ? String(t).trim() : ('$' + String(t).trim())
|
||||
);
|
||||
|
||||
const targetPath = curAbs ? `${curAbs}.${targetToken}` : targetToken;
|
||||
const baseNorm = normalizePath(curAbs || '');
|
||||
const tokenNorm = normalizePath(targetToken);
|
||||
const targetPath = (baseNorm && (tokenNorm === baseNorm || tokenNorm.startsWith(baseNorm + '.')))
|
||||
? tokenNorm
|
||||
: (curAbs ? `${curAbs}.${targetToken}` : targetToken);
|
||||
const absPath = normalizePath(targetPath);
|
||||
const delta = parseDirectivesTokenList(dirs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user