mirror of
https://github.com/grocy/grocy.git
synced 2026-04-04 20:06:16 +02:00
Handle null Userfield values in userfieldsform component (fixes #1953)
This commit is contained in:
parent
721a0ce417
commit
5b53175ed6
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
### Userfields
|
### Userfields
|
||||||
|
|
||||||
- xxx
|
- Fixed that edit forms were broken when editing an object with `null` Userfields (so when the field for that object was not set before / on the initial object creation)
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ Grocy.Components.UserfieldsForm.Load = function()
|
||||||
}
|
}
|
||||||
else if (input.attr("data-userfield-type") == "link")
|
else if (input.attr("data-userfield-type") == "link")
|
||||||
{
|
{
|
||||||
if (!value.isEmpty())
|
if (value != null && !value.isEmpty())
|
||||||
{
|
{
|
||||||
var data = JSON.parse(value);
|
var data = JSON.parse(value);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user