anear-js-api 0.4.12 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/models/AnearEvent.js
CHANGED
|
@@ -62,19 +62,19 @@ class AnearEvent extends JsonApiResource {
|
|
|
62
62
|
return this.relationships.zone.data.id
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
getClonedFromEvent() {
|
|
66
66
|
// if the current event was a clone of previous event, fetch if from
|
|
67
67
|
// Peristence and return
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
68
|
+
const clonedFromEventData = this.relationships["cloned-from"].data
|
|
69
|
+
if (!clonedFromEventData) return null
|
|
70
70
|
|
|
71
71
|
return this.constructor.getFromStorage(clonedEventData.id)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
async
|
|
75
|
-
const
|
|
74
|
+
async clonedFromEventContext() {
|
|
75
|
+
const clonedFrom = await this.getClonedFromEvent()
|
|
76
76
|
|
|
77
|
-
return
|
|
77
|
+
return clonedFrom ? clonedFrom.context : null
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
get stateMachineContext() {
|
package/package.json
CHANGED