mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 21:31:20 -08:00
简化工具函数
This commit is contained in:
1 parent
be4d1d0437
commit
1270167a3e
26 files changed
+182
-152
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { errorHandle, hasOwnProperty } from '../utils';
|
||||
import { errorHandle, has } from '../utils';
|
||||
import subtitleOffset from './subtitleOffset';
|
||||
import localVideo from './localVideo';
|
||||
import localSubtitle from './localSubtitle';
|
||||
@@ -54,7 +54,7 @@ export default class Plugins {
|
||||
pluginName = `plugin${this.id}`;
|
||||
}
|
||||
errorHandle(
|
||||
!hasOwnProperty(this, pluginName),
|
||||
!has(this, pluginName),
|
||||
`Cannot add a plugin that already has the same name: ${pluginName}`,
|
||||
);
|
||||
Object.defineProperty(this, pluginName, {
|
||||
|
||||
Reference in new issue
Block a user