MCPcopy Create free account
hub / github.com/codecombat/codecombat / constructor

Method constructor

app/views/editor/PatchModal.js:43–54  ·  view source on GitHub ↗
(patch, targetModel, options)

Source from the content-addressed store, hash-verified

41 }
42
43 constructor (patch, targetModel, options) {
44 super(options)
45 this.patch = patch
46 this.targetModel = targetModel
47 const targetID = this.patch.get('target').id
48 if (targetID === this.targetModel.id) {
49 this.originalSource = this.targetModel.clone(false)
50 } else {
51 this.originalSource = new this.targetModel.constructor({ _id: targetID })
52 this.supermodel.loadModel(this.originalSource)
53 }
54 }
55
56 applyDelta () {
57 this.headModel = null

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected