umco / umbraco-vorto

1:1 multilingual property editor wrapper for Umbraco

Home Page:https://our.umbraco.org/projects/backoffice-extensions/vorto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty fields break JS

kjac opened this issue · comments

If I have a simple text field in multiple languages, and I empty the value of the text field in all languages, the Vorto JS breaks when publishing twice in a row.

Steps:

  • Open the JS console :)
  • In a Vorto datatype wrapping a simple text field, clean out all values in all languages and hit save and publish.
  • Hit save and publish again.
  • The console logs JS errors.

I think it's the assignment of undefined that causes the issue. If you replace undefined with {}, it seems to work just fine.

I created a PR in this issue that fixes it for me #58

Should be fixed in 97d9020 / 075b9cf