Skip to content

Commit 38db31b

Browse files
committed
Stable Version 2.1.1.
1 parent 0c0a9e6 commit 38db31b

File tree

6 files changed

+137
-126
lines changed

6 files changed

+137
-126
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##### 2.1.1 - 10 July 2015
2+
3+
###### Backwards compatible bug fixes
4+
- fix for loading relations in find and findAll()
5+
16
##### 2.1.0 - 10 July 2015
27

38
###### Backwards compatible API changes

dist/js-data-firebase.js

+125-122
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* js-data-firebase
3-
* @version 2.1.0 - Homepage <http://www.js-data.io/docs/dsfirebaseadapter>
3+
* @version 2.1.1 - Homepage <http://www.js-data.io/docs/dsfirebaseadapter>
44
* @author Jason Dobry <[email protected]>
55
* @copyright (c) 2014-2015 Jason Dobry
66
* @license MIT <https://github.com/js-data/js-data-firebase/blob/master/LICENSE>
@@ -172,11 +172,14 @@ return /******/ (function(modules) { // webpackBootstrap
172172
if (containedName) {
173173
(function () {
174174
var __options = DSUtils.deepMixIn({}, options.orig ? options.orig() : options);
175+
__options['with'] = options['with'].slice();
175176
__options = DSUtils._(relationDef, __options);
176177
DSUtils.remove(__options['with'], containedName);
177178
DSUtils.forEach(__options['with'], function (relation, i) {
178179
if (relation && relation.indexOf(containedName) === 0 && relation.length >= containedName.length && relation[containedName.length] === '.') {
179180
__options['with'][i] = relation.substr(containedName.length + 1);
181+
} else {
182+
__options['with'][i] = '';
180183
}
181184
});
182185

@@ -513,7 +516,7 @@ return /******/ (function(modules) { // webpackBootstrap
513516
/* 3 */
514517
/***/ function(module, exports, __webpack_require__) {
515518

516-
var forOwn = __webpack_require__(6);
519+
var forOwn = __webpack_require__(8);
517520

518521
/**
519522
* Get object values
@@ -535,7 +538,7 @@ return /******/ (function(modules) { // webpackBootstrap
535538
/* 4 */
536539
/***/ function(module, exports, __webpack_require__) {
537540

538-
var makeIterator = __webpack_require__(7);
541+
var makeIterator = __webpack_require__(6);
539542

540543
/**
541544
* Array map
@@ -563,7 +566,7 @@ return /******/ (function(modules) { // webpackBootstrap
563566
/* 5 */
564567
/***/ function(module, exports, __webpack_require__) {
565568

566-
var filter = __webpack_require__(8);
569+
var filter = __webpack_require__(7);
567570

568571
/**
569572
* @return {array} Array of unique items
@@ -594,34 +597,9 @@ return /******/ (function(modules) { // webpackBootstrap
594597
/* 6 */
595598
/***/ function(module, exports, __webpack_require__) {
596599

597-
var hasOwn = __webpack_require__(9);
598-
var forIn = __webpack_require__(10);
599-
600-
/**
601-
* Similar to Array/forEach but works over object properties and fixes Don't
602-
* Enum bug on IE.
603-
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
604-
*/
605-
function forOwn(obj, fn, thisObj){
606-
forIn(obj, function(val, key){
607-
if (hasOwn(obj, key)) {
608-
return fn.call(thisObj, obj[key], key, obj);
609-
}
610-
});
611-
}
612-
613-
module.exports = forOwn;
614-
615-
616-
617-
618-
/***/ },
619-
/* 7 */
620-
/***/ function(module, exports, __webpack_require__) {
621-
622-
var identity = __webpack_require__(11);
623-
var prop = __webpack_require__(12);
624-
var deepMatches = __webpack_require__(13);
600+
var identity = __webpack_require__(9);
601+
var prop = __webpack_require__(10);
602+
var deepMatches = __webpack_require__(11);
625603

626604
/**
627605
* Converts argument into a valid iterator.
@@ -656,10 +634,10 @@ return /******/ (function(modules) { // webpackBootstrap
656634

657635

658636
/***/ },
659-
/* 8 */
637+
/* 7 */
660638
/***/ function(module, exports, __webpack_require__) {
661639

662-
var makeIterator = __webpack_require__(7);
640+
var makeIterator = __webpack_require__(6);
663641

664642
/**
665643
* Array filter
@@ -688,107 +666,32 @@ return /******/ (function(modules) { // webpackBootstrap
688666

689667

690668
/***/ },
691-
/* 9 */
692-
/***/ function(module, exports, __webpack_require__) {
693-
694-
695-
696-
/**
697-
* Safer Object.hasOwnProperty
698-
*/
699-
function hasOwn(obj, prop){
700-
return Object.prototype.hasOwnProperty.call(obj, prop);
701-
}
702-
703-
module.exports = hasOwn;
704-
705-
706-
707-
708-
/***/ },
709-
/* 10 */
669+
/* 8 */
710670
/***/ function(module, exports, __webpack_require__) {
711671

712-
var hasOwn = __webpack_require__(9);
713-
714-
var _hasDontEnumBug,
715-
_dontEnums;
716-
717-
function checkDontEnum(){
718-
_dontEnums = [
719-
'toString',
720-
'toLocaleString',
721-
'valueOf',
722-
'hasOwnProperty',
723-
'isPrototypeOf',
724-
'propertyIsEnumerable',
725-
'constructor'
726-
];
727-
728-
_hasDontEnumBug = true;
729-
730-
for (var key in {'toString': null}) {
731-
_hasDontEnumBug = false;
732-
}
733-
}
672+
var hasOwn = __webpack_require__(12);
673+
var forIn = __webpack_require__(13);
734674

735675
/**
736676
* Similar to Array/forEach but works over object properties and fixes Don't
737677
* Enum bug on IE.
738678
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
739679
*/
740-
function forIn(obj, fn, thisObj){
741-
var key, i = 0;
742-
// no need to check if argument is a real object that way we can use
743-
// it for arrays, functions, date, etc.
744-
745-
//post-pone check till needed
746-
if (_hasDontEnumBug == null) checkDontEnum();
747-
748-
for (key in obj) {
749-
if (exec(fn, obj, key, thisObj) === false) {
750-
break;
751-
}
752-
}
753-
754-
755-
if (_hasDontEnumBug) {
756-
var ctor = obj.constructor,
757-
isProto = !!ctor && obj === ctor.prototype;
758-
759-
while (key = _dontEnums[i++]) {
760-
// For constructor, if it is a prototype object the constructor
761-
// is always non-enumerable unless defined otherwise (and
762-
// enumerated above). For non-prototype objects, it will have
763-
// to be defined on this object, since it cannot be defined on
764-
// any prototype objects.
765-
//
766-
// For other [[DontEnum]] properties, check if the value is
767-
// different than Object prototype value.
768-
if (
769-
(key !== 'constructor' ||
770-
(!isProto && hasOwn(obj, key))) &&
771-
obj[key] !== Object.prototype[key]
772-
) {
773-
if (exec(fn, obj, key, thisObj) === false) {
774-
break;
775-
}
776-
}
680+
function forOwn(obj, fn, thisObj){
681+
forIn(obj, function(val, key){
682+
if (hasOwn(obj, key)) {
683+
return fn.call(thisObj, obj[key], key, obj);
777684
}
778-
}
779-
}
780-
781-
function exec(fn, obj, key, thisObj){
782-
return fn.call(thisObj, obj[key], key, obj);
685+
});
783686
}
784687

785-
module.exports = forIn;
688+
module.exports = forOwn;
786689

787690

788691

789692

790693
/***/ },
791-
/* 11 */
694+
/* 9 */
792695
/***/ function(module, exports, __webpack_require__) {
793696

794697

@@ -806,7 +709,7 @@ return /******/ (function(modules) { // webpackBootstrap
806709

807710

808711
/***/ },
809-
/* 12 */
712+
/* 10 */
810713
/***/ function(module, exports, __webpack_require__) {
811714

812715

@@ -826,10 +729,10 @@ return /******/ (function(modules) { // webpackBootstrap
826729

827730

828731
/***/ },
829-
/* 13 */
732+
/* 11 */
830733
/***/ function(module, exports, __webpack_require__) {
831734

832-
var forOwn = __webpack_require__(6);
735+
var forOwn = __webpack_require__(8);
833736
var isArray = __webpack_require__(14);
834737

835738
function containsMatch(array, pattern) {
@@ -886,6 +789,106 @@ return /******/ (function(modules) { // webpackBootstrap
886789

887790

888791

792+
/***/ },
793+
/* 12 */
794+
/***/ function(module, exports, __webpack_require__) {
795+
796+
797+
798+
/**
799+
* Safer Object.hasOwnProperty
800+
*/
801+
function hasOwn(obj, prop){
802+
return Object.prototype.hasOwnProperty.call(obj, prop);
803+
}
804+
805+
module.exports = hasOwn;
806+
807+
808+
809+
810+
/***/ },
811+
/* 13 */
812+
/***/ function(module, exports, __webpack_require__) {
813+
814+
var hasOwn = __webpack_require__(12);
815+
816+
var _hasDontEnumBug,
817+
_dontEnums;
818+
819+
function checkDontEnum(){
820+
_dontEnums = [
821+
'toString',
822+
'toLocaleString',
823+
'valueOf',
824+
'hasOwnProperty',
825+
'isPrototypeOf',
826+
'propertyIsEnumerable',
827+
'constructor'
828+
];
829+
830+
_hasDontEnumBug = true;
831+
832+
for (var key in {'toString': null}) {
833+
_hasDontEnumBug = false;
834+
}
835+
}
836+
837+
/**
838+
* Similar to Array/forEach but works over object properties and fixes Don't
839+
* Enum bug on IE.
840+
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
841+
*/
842+
function forIn(obj, fn, thisObj){
843+
var key, i = 0;
844+
// no need to check if argument is a real object that way we can use
845+
// it for arrays, functions, date, etc.
846+
847+
//post-pone check till needed
848+
if (_hasDontEnumBug == null) checkDontEnum();
849+
850+
for (key in obj) {
851+
if (exec(fn, obj, key, thisObj) === false) {
852+
break;
853+
}
854+
}
855+
856+
857+
if (_hasDontEnumBug) {
858+
var ctor = obj.constructor,
859+
isProto = !!ctor && obj === ctor.prototype;
860+
861+
while (key = _dontEnums[i++]) {
862+
// For constructor, if it is a prototype object the constructor
863+
// is always non-enumerable unless defined otherwise (and
864+
// enumerated above). For non-prototype objects, it will have
865+
// to be defined on this object, since it cannot be defined on
866+
// any prototype objects.
867+
//
868+
// For other [[DontEnum]] properties, check if the value is
869+
// different than Object prototype value.
870+
if (
871+
(key !== 'constructor' ||
872+
(!isProto && hasOwn(obj, key))) &&
873+
obj[key] !== Object.prototype[key]
874+
) {
875+
if (exec(fn, obj, key, thisObj) === false) {
876+
break;
877+
}
878+
}
879+
}
880+
}
881+
}
882+
883+
function exec(fn, obj, key, thisObj){
884+
return fn.call(thisObj, obj[key], key, obj);
885+
}
886+
887+
module.exports = forIn;
888+
889+
890+
891+
889892
/***/ },
890893
/* 14 */
891894
/***/ function(module, exports, __webpack_require__) {

0 commit comments

Comments
 (0)