mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-03 18:24:04 +00:00
Restore old list property validation logic
This commit is contained in:
parent
e0a439e6eb
commit
3e87ef33ce
@ -356,12 +356,19 @@ inline bool Value<T>::is_valid_for_property(ContextType context, const ValueType
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (realm::is_array(prop.type)) {
|
if (realm::is_array(prop.type)) {
|
||||||
if (prop.type == PropertyType::Object) {
|
if (prop.type != PropertyType::Object) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: Do we need to validate the types of the contained objects?
|
||||||
|
if (is_array(context, value)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_object(context, value)) {
|
||||||
auto object = to_object(context, value);
|
auto object = to_object(context, value);
|
||||||
return Object<T>::template is_instance<ResultsClass<T>>(context, object)
|
return Object<T>::template is_instance<ResultsClass<T>>(context, object)
|
||||||
|| Object<T>::template is_instance<ListClass<T>>(context, object);
|
|| Object<T>::template is_instance<ListClass<T>>(context, object);
|
||||||
} else if (prop.type == PropertyType::LinkingObjects) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user