Angular-Meteor not updating blank field


#1

So I ran across an interesting issue in my application when I try to remove all text from an input field. It won’t let me remove the final character after backspacing.

The error I get in the browser console is:

update failed: MongoError: '$set' is empty. You must specify a field like so: {$mod: {<field>: ...}}

This error makes sense, because I’m trying to set an existing property in the document to an empty value. However I don’t know why it’s behaving this way.

I’ve made a minimal app to demonstrate the issue, which anyone should be able to clone and run: https://github.com/mandreko/meteor_mongo_set_error

Additionally, here is a video demonstrating the error: https://youtu.be/Z4jrZwg72h0