simplajs / simpla

Open, modular, and serverless content management for a modern web
https://www.simplajs.org
MIT License
527 stars 36 forks source link

[v2] Removing parent UID should remove child paths #50

Closed madeleineostoja closed 7 years ago

madeleineostoja commented 7 years ago

Scenario

UID foo.bar.baz exists Simpla.remove('foo.bar') called

Expected outcome

The foo.bar path is removed. That is, foo.bar and all of its children are removed.

Actual outcome

Only the specific identifier foo.bar is removed, so foo and foo.bar.baz exist, but foo.bar does not.

This will also play into the move from UIDs -> paths, but I imagine is a separate issue in terms of implementation.

madeleineostoja commented 7 years ago

Fixed in https://github.com/simplaio/simpla/commit/1c27c1729f9f9ca4b9697c81355188e2750b2e5d