Skip to content

Commit

Permalink
Merge pull request #437 from jpudysz/feature/merging-exotic-styles
Browse files Browse the repository at this point in the history
fix: mergin exotic styles with unistyles
  • Loading branch information
jpudysz authored Dec 14, 2024
2 parents cc82148 + 1f09e4a commit 7a5fc85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cxx/parser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,17 @@ void parser::Parser::parseUnistyles(jsi::Runtime& rt, std::shared_ptr<StyleSheet
// rebuild all unistyles in StyleSheet that depends on variants
void parser::Parser::rebuildUnistyleWithVariants(jsi::Runtime& rt, std::shared_ptr<core::UnistyleData> unistyleData) {
if (unistyleData->unistyle->styleKey == helpers::EXOTIC_STYLE_KEY) {
unistyleData->parsedStyle = std::move(unistyleData->unistyle->rawValue);

return;
}

if (unistyleData->unistyle->type == UnistyleType::Object) {
unistyleData->parsedStyle = this->parseFirstLevel(rt, unistyleData->unistyle, unistyleData->variants);

return;
}

// for functions we need to call them with memoized arguments
auto unistyleFn = std::dynamic_pointer_cast<UnistyleDynamicFunction>(unistyleData->unistyle);

Expand Down

0 comments on commit 7a5fc85

Please sign in to comment.