Skip to content

Commit 4ea0ee2

Browse files
author
plus li
committed
修改Nuxt下的报错Bug
1 parent 6f8ea47 commit 4ea0ee2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-video-player",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "Video Player component for Vue2",
55
"main": "index.js",
66
"scripts": {

player.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@
100100
// console.log(videoOptions)
101101
102102
// avoid error "VIDEOJS: ERROR: Unable to find plugin: __ob__"
103-
delete videoOptions.plugins.__ob__
103+
if (videoOptions.plugins) {
104+
delete videoOptions.plugins.__ob__
105+
}
104106
this.player = videojs(this.$el.children[0], videoOptions, function() {
105107
106108
// player readied

0 commit comments

Comments
 (0)