Skip to content

Commit

Permalink
fix: import fails if front/back cell is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jxjj committed Jan 17, 2025
1 parent 782ee14 commit 85db79f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Imports/CardsImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public function __construct($deckId)
$this->deckId = $deckId;
}

protected function createBlock(string $content, string $type = 'text')
protected function createBlock(?string $content, string $type = 'text')
{
return [
'id' => Str::uuid()->toString(),
'type' => $type,
'content' => $content,
'content' => $content ?? '',
'meta' => null,
];
}
Expand Down

0 comments on commit 85db79f

Please sign in to comment.