Skip to content

Commit

Permalink
feat(audio-picker): set default values for config properties to make …
Browse files Browse the repository at this point in the history
…this feature backward compatible
  • Loading branch information
mostafaznv committed Sep 29, 2023
1 parent 79b7f99 commit 001fbc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AudioStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function __construct(string $disk = 'audio')
{
parent::__construct($disk);

$this->namingMethod = config('nova-ckeditor.audio-naming-method');
$this->namingMethod = config('nova-ckeditor.audio-naming-method') ?? 'hash-file';
}

public static function make(string $disk = 'audio'): self
Expand Down
2 changes: 1 addition & 1 deletion src/CkEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ private function prepareToolbar(string $toolbar, array $items = null): void
$this->height = $toolbar['height'];
$this->imageBrowser = $toolbar['browser']['image'];
$this->videoBrowser = $toolbar['browser']['video'];
$this->audioBrowser = $toolbar['browser']['audio'];
$this->audioBrowser = $toolbar['browser']['audio'] ?? true;
$this->snippetBrowser = $this->prepareSnippets($toolbar['snippets']);
$this->contentLanguage = $toolbar['content-lang'];
$this->textPartLanguage = $toolbar['text-part-language'] ?? $defaultTextPartLanguage;
Expand Down

0 comments on commit 001fbc1

Please sign in to comment.