Skip to content

Commit

Permalink
fix adapter key
Browse files Browse the repository at this point in the history
  • Loading branch information
n1crack committed Oct 8, 2022
1 parent e143383 commit 37a3291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/VueFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public function __construct(array $storages)

$this->request = Request::createFromGlobals();

$this->adapterKey = $this->request->get('adapter', array_keys($storages)[0]);
$this->adapterKey = $this->request->get('adapter');

if (!$this->adapterKey || !in_array($this->adapterKey, array_keys($storages)) ) {
$this->adapterKey = array_keys($storages)[0];
}

$this->storages = array_keys($storages);

Expand Down

0 comments on commit 37a3291

Please sign in to comment.