Fixes #1328.
This commit is contained in:
parent
fb83028d87
commit
3325332626
2 changed files with 7 additions and 2 deletions
app/views
|
@ -31,7 +31,7 @@ module.exports = class DeltaView extends CocoView
|
||||||
|
|
||||||
for modelName in ['model', 'headModel', 'comparisonModel']
|
for modelName in ['model', 'headModel', 'comparisonModel']
|
||||||
@[modelName] = options[modelName]
|
@[modelName] = options[modelName]
|
||||||
continue unless @[modelName]
|
continue unless @[modelName] and options.loadModels
|
||||||
if not @[modelName].isLoaded
|
if not @[modelName].isLoaded
|
||||||
@[modelName] = @supermodel.loadModel(@[modelName], 'document').model
|
@[modelName] = @supermodel.loadModel(@[modelName], 'document').model
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,12 @@ module.exports = class VersionsModalView extends ModalView
|
||||||
|
|
||||||
laterVersion = new @model(_id: $(rows[0]).val())
|
laterVersion = new @model(_id: $(rows[0]).val())
|
||||||
earlierVersion = new @model(_id: $(rows[1]).val())
|
earlierVersion = new @model(_id: $(rows[1]).val())
|
||||||
@deltaView = new DeltaView({model: earlierVersion, comparisonModel: laterVersion, skipPaths: PatchModal.DOC_SKIP_PATHS})
|
@deltaView = new DeltaView({
|
||||||
|
model: earlierVersion
|
||||||
|
comparisonModel: laterVersion
|
||||||
|
skipPaths: PatchModal.DOC_SKIP_PATHS
|
||||||
|
loadModels: true
|
||||||
|
})
|
||||||
@insertSubView(@deltaView, deltaEl)
|
@insertSubView(@deltaView, deltaEl)
|
||||||
|
|
||||||
getRenderData: (context={}) ->
|
getRenderData: (context={}) ->
|
||||||
|
|
Reference in a new issue