Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
kaorun343 committed Jun 30, 2018
1 parent c64bbb2 commit 7bd369c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import YouTubePlayer from './player'
export { YouTubePlayer, getIdFromURL, getTimeFromURL }

export default {
install(Vue, options = { global: true }) {
install (Vue, options = {}) {
container.Vue = Vue
YouTubePlayer.ready = YouTubePlayer.mounted
const { global = true, componentId = 'youtube' } = options

if (options.global) {
if (global) {
// if there is a global component with "youtube" identifier already taken
// then we should let user to pass a new identifier.
const componentId = options.componentId || 'youtube';
Vue.component(componentId, YouTubePlayer)
}
Vue.prototype.$youtube = { getIdFromURL, getTimeFromURL }
Expand Down

0 comments on commit 7bd369c

Please sign in to comment.