mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-08-17 07:00:22 +03:00
Handle failed node descriptor lookups more gracefully
We made this change in one place, but not in another. The real fix is to make both places use the same copy of `resolveNodeDescriptor`, but that'll have to wait another month.
This commit is contained in:
parent
ca02c51da5
commit
b61e491f2e
@ -79,7 +79,7 @@ function resolveNodePosition(node, descriptor) {
|
||||
let result = parts.length === 0 ?
|
||||
node :
|
||||
resolveNodeDescriptor(node, parts.join('.'));
|
||||
|
||||
if (!result) { return null; }
|
||||
return result[lastPart];
|
||||
}
|
||||
|
||||
@ -2535,6 +2535,7 @@ class FoldResolver {
|
||||
let value = options[key];
|
||||
end = this.applyFoldAdjustment(key, end, node, value, props, this.layer);
|
||||
}
|
||||
if (!end) { return null; }
|
||||
|
||||
end = Point.fromObject(end, true);
|
||||
end = this.buffer.clipPosition(end);
|
||||
|
Loading…
Reference in New Issue
Block a user