parse 5.1.0-alpha.4 → 5.1.0-alpha.5

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.
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.1.0-alpha.4
2
+ * Parse JavaScript SDK v5.1.0-alpha.5
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -557,7 +557,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
557
557
  SERVER_AUTH_TOKEN: null,
558
558
  LIVEQUERY_SERVER_URL: null,
559
559
  ENCRYPTED_KEY: null,
560
- VERSION: 'js' + "5.1.0-alpha.4",
560
+ VERSION: 'js' + "5.1.0-alpha.5",
561
561
  APPLICATION_ID: null,
562
562
  JAVASCRIPT_KEY: null,
563
563
  MASTER_KEY: null,
@@ -16827,6 +16827,7 @@ var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/ty
16827
16827
  var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
16828
16828
  var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
16829
16829
  var _includes = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/includes"));
16830
+ var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
16830
16831
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
16831
16832
  var _setTimeout2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/set-timeout"));
16832
16833
  var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
@@ -16951,11 +16952,14 @@ var RESTController = {
16951
16952
  var response;
16952
16953
  try {
16953
16954
  response = JSON.parse(xhr.responseText);
16955
+ var availableHeaders = typeof xhr.getAllResponseHeaders === 'function' ? xhr.getAllResponseHeaders() : "";
16954
16956
  headers = {};
16955
- if (typeof xhr.getResponseHeader === 'function' && xhr.getResponseHeader('access-control-expose-headers')) {
16957
+ if (typeof xhr.getResponseHeader === 'function' && (availableHeaders === null || availableHeaders === void 0 ? void 0 : (0, _indexOf.default)(availableHeaders).call(availableHeaders, 'access-control-expose-headers')) >= 0) {
16956
16958
  var responseHeaders = xhr.getResponseHeader('access-control-expose-headers').split(', ');
16957
16959
  (0, _forEach.default)(responseHeaders).call(responseHeaders, function (header) {
16958
- headers[header] = xhr.getResponseHeader(header.toLowerCase());
16960
+ if ((0, _indexOf.default)(availableHeaders).call(availableHeaders, header.toLowerCase()) >= 0) {
16961
+ headers[header] = xhr.getResponseHeader(header.toLowerCase());
16962
+ }
16959
16963
  });
16960
16964
  }
16961
16965
  } catch (e) {
@@ -17159,7 +17163,7 @@ var RESTController = {
17159
17163
  };
17160
17164
  module.exports = RESTController;
17161
17165
  }).call(this)}).call(this,_dereq_('_process'))
17162
- },{"./CoreManager":4,"./ParseError":23,"./promiseUtils":54,"./uuid":57,"@babel/runtime-corejs3/core-js-stable/instance/filter":64,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/includes":68,"@babel/runtime-corejs3/core-js-stable/json/stringify":78,"@babel/runtime-corejs3/core-js-stable/object/define-properties":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":89,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/core-js-stable/promise":93,"@babel/runtime-corejs3/core-js-stable/set-timeout":96,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128,"_process":132}],39:[function(_dereq_,module,exports){
17166
+ },{"./CoreManager":4,"./ParseError":23,"./promiseUtils":54,"./uuid":57,"@babel/runtime-corejs3/core-js-stable/instance/filter":64,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/includes":68,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/json/stringify":78,"@babel/runtime-corejs3/core-js-stable/object/define-properties":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":89,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/core-js-stable/promise":93,"@babel/runtime-corejs3/core-js-stable/set-timeout":96,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128,"_process":132}],39:[function(_dereq_,module,exports){
17163
17167
  "use strict";
17164
17168
 
17165
17169
  var _typeof = _dereq_("@babel/runtime-corejs3/helpers/typeof");