SL-11216: Allow llsd::drill() to accept LLSD() as (empty) path.
Before this change, you had to literally pass LLSD::emptyArray() to get no-op behavior.master
parent
3a9498a8e1
commit
16ef497e18
|
|
@ -691,9 +691,10 @@ namespace llsd
|
|||
LLSD& drill(LLSD& blob, const LLSD& rawPath)
|
||||
{
|
||||
// Treat rawPath uniformly as an array. If it's not already an array,
|
||||
// store it as the only entry in one.
|
||||
// store it as the only entry in one. (But let's say Undefined means an
|
||||
// empty array.)
|
||||
LLSD path;
|
||||
if (rawPath.isArray())
|
||||
if (rawPath.isArray() || rawPath.isUndefined())
|
||||
{
|
||||
path = rawPath;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue