We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export class Cart extends Pring.Base { @property cartSKUs: Pring.NestedCollection<CartSKU> = new Pring.NestedCollection(this) } export class CartSKU extends Pring.Base { @property quantity: number }
const cart = new Firebase.Cart() cart.init(cartSnapshot) console.log(cart.cartSKUs.objects) // => [] cart.cartSKUs.forEach(c => { console.log('c.id', c.id) }) const cartSKUs = await cart.cartSKUs.getReference().get().then(s => s.docs) cartSKUs.forEach(c => { console.log(c.id) // => logged cartSKU id })
Collection の forEach を実行しても、 objects が [] なので for が周りません。 firestore を直で叩くと cartSKU 情報は取得できているので、情報は存在します。
The text was updated successfully, but these errors were encountered:
const cartSKUs: Firebase.CartSKU[] = await cart.cartSKUs.getReference().get().then(s => { return s.docs.map(doc => { const cartSKU = new Firebase.CartSKU() cartSKU.init(doc) return cartSKU }) })
クライアント側でこれをやればいいので pring.ts 側でサポートする必要はない気がしてきた 🤔
Sorry, something went wrong.
No branches or pull requests
Collection の forEach を実行しても、 objects が [] なので for が周りません。
firestore を直で叩くと cartSKU 情報は取得できているので、情報は存在します。
The text was updated successfully, but these errors were encountered: