fable 3.0.67 → 3.0.69

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fable",
3
- "version": "3.0.67",
3
+ "version": "3.0.69",
4
4
  "description": "An entity behavior management and API bundling library.",
5
5
  "main": "source/Fable.js",
6
6
  "scripts": {
@@ -58,7 +58,7 @@
58
58
  "cookie": "^0.5.0",
59
59
  "data-arithmatic": "^1.0.7",
60
60
  "fable-log": "^3.0.10",
61
- "fable-serviceproviderbase": "^3.0.8",
61
+ "fable-serviceproviderbase": "^3.0.10",
62
62
  "fable-settings": "^3.0.6",
63
63
  "fable-uuid": "^3.0.5",
64
64
  "manyfest": "^1.0.25",
@@ -35,10 +35,13 @@ class FableServiceUtility extends libFableServiceBase
35
35
  for (let i = 0; i < pSourceObjects.length; i++)
36
36
  {
37
37
  let tmpSourceObject = pSourceObjects[i];
38
- let tmpObjectProperties = Object.keys(tmpSourceObject);
39
- for (let k = 0; k < tmpObjectProperties.length; k++)
38
+ if (typeof(tmpSourceObject) === 'object')
40
39
  {
41
- pDestinationObject[tmpObjectProperties[k]] = tmpSourceObject[tmpObjectProperties[k]];
40
+ let tmpObjectProperties = Object.keys(tmpSourceObject);
41
+ for (let k = 0; k < tmpObjectProperties.length; k++)
42
+ {
43
+ pDestinationObject[tmpObjectProperties[k]] = tmpSourceObject[tmpObjectProperties[k]];
44
+ }
42
45
  }
43
46
  }
44
47
  return pDestinationObject;
@@ -132,6 +132,20 @@ suite
132
132
  }
133
133
  );
134
134
  test
135
+ (
136
+ 'merging objects should not fail with undefined or nulls',
137
+ function()
138
+ {
139
+ testFable = new libFable();
140
+ let tmpResult = testFable.services.Utility.extend({SomeValue:'here',Size:10},{Color:'Red',Size:20},undefined);
141
+ Expect(tmpResult).to.have.a.property('SomeValue')
142
+ .that.is.a('string');
143
+ Expect(tmpResult.SomeValue).to.equal('here');
144
+ Expect(tmpResult.Color).to.equal('Red');
145
+ Expect(tmpResult.Size).to.equal(20);
146
+ }
147
+ );
148
+ test
135
149
  (
136
150
  'merging objects should work like old underscore did with more paramters',
137
151
  function()