Skip to content

Commit

Permalink
Merge pull request #6 from trollderius/patch-2
Browse files Browse the repository at this point in the history
Allow Toastr usage without 'toastr.options' config definition
  • Loading branch information
oriceon authored Apr 30, 2018
2 parents 4ce3779 + 28957fa commit 8a03502
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Kamaln7/Toastr/Toastr.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public function render() {
foreach($notifications as $notification) {

$config = $this->config->get('toastr.options');
if(empty($config)){
$config = [];
}

if(count($notification['options']) > 0) {
// Merge user supplied options with default options
Expand Down

0 comments on commit 8a03502

Please sign in to comment.