Fix getting information for root.
This commit is contained in:
parent
b6cded379e
commit
fa287c2422
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ bool GetChildNode(const std::string& name,
|
|||
bool GetNodeFromPath(std::string path,
|
||||
const base::DictionaryValue* root,
|
||||
const base::DictionaryValue** out) {
|
||||
if (path == "") {
|
||||
*out = root;
|
||||
return true;
|
||||
}
|
||||
|
||||
for (size_t delimiter_position = path.find('/');
|
||||
delimiter_position != std::string::npos;
|
||||
delimiter_position = path.find('/')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue