我已经创建了一个包含集合中模型的自定义对象,当我在ItemView中选择这个对象为this.options.unique时,我无法运行.toJSON,因为我说Uncaught TypeError: this.options.unique.toJSON is not a function时出错了。想知道我怎么能解决这个问题?
Fiddle
JS
var PersonModel = Backbone.Model.extend();
var PeopleCollection = Backbone.Collection.extend({
model: PersonModel
});
va
在运行firebase函数时,我正在获取下面的error log,我试图在recentPosts数组字段中获取文档和值。
Error: Unknown error status: Error: Unknown error status: TypeError: elements.get is not a function
at new HttpsError (/srv/node_modules/firebase-functions/lib/providers/https.js:90:19)
at admin.firestore.collectionGroup.where.get.
这是我使用backbone.js渲染内容的content.js。
// Our basic **Content** model has `content`, `order`, and `done` attributes.
var Content = Backbone.Model.extend({
// If you don't provide a Content, one will be provided for you.
EMPTY: "empty Content...",
// Ensure that each Content created has