Skip to content

Commit

Permalink
Merge pull request #1 from hudson-ai-team/patch-raw-data
Browse files Browse the repository at this point in the history
Update RawData.php
  • Loading branch information
StyxOfDynamite authored Sep 9, 2024
2 parents 7288366 + a8cc12c commit 9f4beb6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/Traits/RawData.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public function getRawData(): mixed
*/
public function setRawData(mixed $rawData): void
{
$this->rawData = property_exists($rawData, 'data') ? $rawData->data : $rawData;
try {
if (property_exists($rawData, 'data')) {
$this->rawData = $rawData->data;
} else {
$this->rawData = $rawData;
}
} catch (Error) {
$this->rawData = $rawData;
}
}
}

0 comments on commit 9f4beb6

Please sign in to comment.