Skip to content

Commit

Permalink
Toast Plugin: Fix error with string-option
Browse files Browse the repository at this point in the history
  • Loading branch information
airyland committed Sep 19, 2016
1 parent f9fa59e commit f04fa37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/toast/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
$vm[i] = options[i]
}
}
if (options.onShow || options.onHide) {
if (typeof options === 'object' && options.onShow || options.onHide) {
watcher = $vm.$watch('show', (val) => {
val && options.onShow && options.onShow($vm)
val === false && options.onHide && options.onHide($vm)
Expand Down

0 comments on commit f04fa37

Please sign in to comment.