emotesjs 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +10 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -7,20 +7,22 @@ class EmotesJS {
7
7
  height = "1.65rem"
8
8
  format = "WEBP"
9
9
  allowedOrigins = "https://cdn.7tv.app"
10
- instance
10
+ static instance
11
11
 
12
12
  constructor(opts) {
13
- if (EmoteJS.instance) {
14
- return EmoteJS.instance
13
+ if (EmotesJS.instance) {
14
+ return EmotesJS.instance
15
15
  }
16
16
 
17
- this.channelId = opts.channelId || this.channelId
18
- this.requireColon = opts.requireColon || this.requireColon
19
- this.height = opts.height || this.height
20
- this.format = opts.format || this.format
17
+ if (opts) {
18
+ this.channelId = opts.channelId || this.channelId
19
+ this.requireColon = opts.requireColon || this.requireColon
20
+ this.height = opts.height || this.height
21
+ this.format = opts.format || this.format
22
+ }
21
23
 
22
24
  this.isLoading = this.load()
23
- EmoteJS.instance = this
25
+ EmotesJS.instance = this
24
26
  }
25
27
 
26
28
  async load() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "emotesjs",
3
3
  "description": "",
4
- "version": "0.0.9",
4
+ "version": "0.0.11",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "darckfast"