mirror of
https://github.com/danbulant/discord.js
synced 2026-06-18 06:01:03 +00:00
Fix the regex in Resolve.resolveFile, fixes #171
This commit is contained in:
parent
3306067d7b
commit
c1171e6973
2 changed files with 2 additions and 2 deletions
|
|
@ -134,7 +134,7 @@ var Resolver = (function () {
|
|||
|
||||
Resolver.prototype.resolveFile = function resolveFile(resource) {
|
||||
if (typeof resource === "string" || resource instanceof String) {
|
||||
if (/^http(s):\/\//.test(resource)) {
|
||||
if (/^https?:\/\//.test(resource)) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
_superagent2["default"].get(resource).end(function (err, res) {
|
||||
if (err) {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ export default class Resolver {
|
|||
|
||||
resolveFile(resource) {
|
||||
if (typeof resource === "string" || resource instanceof String) {
|
||||
if (/^http(s):\/\//.test(resource)) {
|
||||
if (/^https?:\/\//.test(resource)) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.get(resource).end((err, res) => {
|
||||
if (err) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue