Skip to content

Commit 7062701

Browse files
committed
Fix error when invalid language passed.
`this.resources` is not defined at the time this error would be thrown, so we use `resources` which is defined.
1 parent 14fed87 commit 7062701

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

XIVAPI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ See how in https://github.com/xivapi/xivapi-js/releases/tag/v0.1.3.\n\
2828

2929
this.endpoint = `https://${options.staging ? 'staging.' : ''}xivapi.com`
3030
if(options.language && !resources.languages.includes(options.language))
31-
throw Error(`Invalid language given, must be one of: ${this.resources.languages}`)
31+
throw Error(`Invalid language given, must be one of: ${resources.languages}`)
3232

3333
this.globalParams = {}
3434

0 commit comments

Comments
 (0)