@posva/vuefire-core
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.3.1](https://github.com/vuejs/vuefire/compare/@posva/vuefire-core@2.3.0...@posva/vuefire-core@2.3.1) (2020-03-17) | ||
### Bug Fixes | ||
* **firestore:** array with objects with references ([b50ac72](https://github.com/vuejs/vuefire/commit/b50ac72e3c4165fa20c72410e185604960b48ba4)), closes [#576](https://github.com/vuejs/vuefire/issues/576) | ||
# [2.3.0](https://github.com/vuejs/vuefire/compare/@posva/vuefire-core@2.2.0...@posva/vuefire-core@2.3.0) (2019-12-31) | ||
@@ -8,0 +19,0 @@ |
/*! | ||
* @posva/vuefire-core v2.3.0 | ||
* (c) 2019 Eduardo San Martin Morote | ||
* @posva/vuefire-core v2.3.1 | ||
* (c) 2020 Eduardo San Martin Morote | ||
* @license MIT | ||
@@ -232,7 +232,8 @@ */ | ||
var newRef = ref[i]; | ||
// TODO: this only works with array of primitives but not with nested properties like objects with References | ||
if (newRef.path in subsByPath) | ||
data[key][i] = subsByPath[newRef.path]; | ||
} | ||
// the oldArray is in this case the same array with holes | ||
recursiveExtract(ref, data[key], path + key + '.', [data[key], refs]); | ||
// the oldArray is in this case the same array with holes unless the array already existed | ||
recursiveExtract(ref, oldDoc[key] || data[key], path + key + '.', [data[key], refs]); | ||
} | ||
@@ -239,0 +240,0 @@ else if (isObject(ref)) { |
/*! | ||
* @posva/vuefire-core v2.3.0 | ||
* (c) 2019 Eduardo San Martin Morote | ||
* @posva/vuefire-core v2.3.1 | ||
* (c) 2020 Eduardo San Martin Morote | ||
* @license MIT | ||
@@ -228,7 +228,8 @@ */ | ||
var newRef = ref[i]; | ||
// TODO: this only works with array of primitives but not with nested properties like objects with References | ||
if (newRef.path in subsByPath) | ||
data[key][i] = subsByPath[newRef.path]; | ||
} | ||
// the oldArray is in this case the same array with holes | ||
recursiveExtract(ref, data[key], path + key + '.', [data[key], refs]); | ||
// the oldArray is in this case the same array with holes unless the array already existed | ||
recursiveExtract(ref, oldDoc[key] || data[key], path + key + '.', [data[key], refs]); | ||
} | ||
@@ -235,0 +236,0 @@ else if (isObject(ref)) { |
{ | ||
"name": "@posva/vuefire-core", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Shared code for vue + Firebase apps used by vuefire and vuexfire", | ||
@@ -45,3 +45,3 @@ "author": "Eduardo San Martin Morote <posva13@gmail.com>", | ||
}, | ||
"gitHead": "e2542ff9c118a82b87fd193927835e9f40ddae81" | ||
"gitHead": "c36a7ba845990674afbbb6c245c57f3aa01bf4aa" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { createSnapshot, extractRefs, FirestoreSerializer, FirestoreReference } from './utils' | ||
import { createSnapshot, extractRefs, FirestoreSerializer } from './utils' | ||
import { walkGet, callOnceWithArg, OperationsType } from '../shared' | ||
@@ -3,0 +3,0 @@ import { firestore } from 'firebase' |
@@ -75,6 +75,7 @@ import { firestore } from 'firebase' | ||
const newRef = ref[i] | ||
// TODO: this only works with array of primitives but not with nested properties like objects with References | ||
if (newRef.path in subsByPath) data[key][i] = subsByPath[newRef.path] | ||
} | ||
// the oldArray is in this case the same array with holes | ||
recursiveExtract(ref, data[key], path + key + '.', [data[key], refs]) | ||
// the oldArray is in this case the same array with holes unless the array already existed | ||
recursiveExtract(ref, oldDoc[key] || data[key], path + key + '.', [data[key], refs]) | ||
} else if (isObject(ref)) { | ||
@@ -81,0 +82,0 @@ data[key] = {} |
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
68145
1638