mirror of
https://github.com/nicbarker/clay.git
synced 2025-05-19 08:51:10 +00:00
[Core] Correctly throw an error when using attach to element id with an invalid id
This commit is contained in:
parent
b33ba4ff62
commit
a21b0665fe
2
clay.h
2
clay.h
@ -2038,7 +2038,7 @@ void Clay__ConfigureOpenElementPtr(const Clay_ElementDeclaration *declaration) {
|
||||
}
|
||||
} else if (declaration->floating.attachTo == CLAY_ATTACH_TO_ELEMENT_WITH_ID) {
|
||||
Clay_LayoutElementHashMapItem *parentItem = Clay__GetHashMapItem(floatingConfig.parentId);
|
||||
if (!parentItem) {
|
||||
if (parentItem == &Clay_LayoutElementHashMapItem_DEFAULT) {
|
||||
context->errorHandler.errorHandlerFunction(CLAY__INIT(Clay_ErrorData) {
|
||||
.errorType = CLAY_ERROR_TYPE_FLOATING_CONTAINER_PARENT_NOT_FOUND,
|
||||
.errorText = CLAY_STRING("A floating element was declared with a parentId, but no element with that ID was found."),
|
||||
|
Loading…
Reference in New Issue
Block a user