resource-loader
Advanced tools
Comparing version 1.6.3 to 1.6.4
{ | ||
"name": "resource-loader", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"main": "./src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "A generic asset loader, made with web games in mind.", |
@@ -277,3 +277,3 @@ var async = require('async'), | ||
this.baseUrl.lastIndexOf('/') !== this.baseUrl.length - 1 && | ||
url.lastIndexOf('/') !== url.length - 1 | ||
url.charAt(0) !== '/' | ||
) { | ||
@@ -280,0 +280,0 @@ return this.baseUrl + '/' + url; |
@@ -15,3 +15,3 @@ var EventEmitter = require('eventemitter3'), | ||
* @param [options] {object} The options for the load. | ||
* @param [options.crossOrigin] {boolean} Is this request cross-origin? Default is to determine automatically. | ||
* @param [options.crossOrigin] {string|boolean} Is this request cross-origin? Default is to determine automatically. | ||
* @param [options.loadType=Resource.LOAD_TYPE.XHR] {Resource.LOAD_TYPE} How should this resource be loaded? | ||
@@ -67,3 +67,3 @@ * @param [options.xhrType=Resource.XHR_RESPONSE_TYPE.DEFAULT] {Resource.XHR_RESPONSE_TYPE} How should the data being | ||
*/ | ||
this.crossOrigin = options.crossOrigin === true ? 'anonymous' : null; | ||
this.crossOrigin = options.crossOrigin === true ? 'anonymous' : options.crossOrigin; | ||
@@ -264,3 +264,3 @@ /** | ||
// if unset, determine the value | ||
if (typeof this.crossOrigin !== 'string') { | ||
if (this.crossOrigin === false || typeof this.crossOrigin !== 'string') { | ||
this.crossOrigin = this._determineCrossOrigin(this.url); | ||
@@ -267,0 +267,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61818