Skip to content

Commit bf48f53

Browse files
authored
Merge pull request surmon-china#71 from Hades-li/master
修改nuxt框架下报错
2 parents 2526207 + 4ea0ee2 commit bf48f53

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
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

ssr.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ var videoPlayer = {
6060
}
6161
}
6262

63-
delete options.plugins.__ob__
63+
if (options.plugins) {
64+
delete options.plugins.__ob__
65+
}
6466
// console.log(options)
6567

6668
var eventEmit = function (vnode, name, data) {

0 commit comments

Comments
 (0)