mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 03:00:35 +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) {
|
Resolver.prototype.resolveFile = function resolveFile(resource) {
|
||||||
if (typeof resource === "string" || resource instanceof String) {
|
if (typeof resource === "string" || resource instanceof String) {
|
||||||
if (/^http(s):\/\//.test(resource)) {
|
if (/^https?:\/\//.test(resource)) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
_superagent2["default"].get(resource).end(function (err, res) {
|
_superagent2["default"].get(resource).end(function (err, res) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ export default class Resolver {
|
||||||
|
|
||||||
resolveFile(resource) {
|
resolveFile(resource) {
|
||||||
if (typeof resource === "string" || resource instanceof String) {
|
if (typeof resource === "string" || resource instanceof String) {
|
||||||
if (/^http(s):\/\//.test(resource)) {
|
if (/^https?:\/\//.test(resource)) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
request.get(resource).end((err, res) => {
|
request.get(resource).end((err, res) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue