When using enmap.delete(key, path), the property at the given path is not actually deleted.
Instead, its value is replaced with undefined.
This causes the key to still exist in the object, which is unexpected behavior for a delete operation.
Example
enmap.set("user", {
name: "Ben",
age: 25
});
enmap.delete("user", "age");
console.log(enmap.get("user"));
Current Result
{
name: "Ben",
age: undefined
}
Expected Result
When using
enmap.delete(key, path), the property at the given path is not actually deleted.Instead, its value is replaced with
undefined.This causes the key to still exist in the object, which is unexpected behavior for a delete operation.
Example
Current Result
Expected Result