mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-23 14:39:32 +08:00
fix(engine): Use context specific pageId in engine.
This commit is contained in:
parent
601c942e4f
commit
e80e461eba
@ -596,7 +596,7 @@ class Blocks {
|
||||
}
|
||||
|
||||
generateBlockId(blockIdPattern) {
|
||||
return `${this.context.lowdefy.pageId}:${blockIdPattern}:${Math.random()
|
||||
return `${this.context.pageId}:${blockIdPattern}:${Math.random()
|
||||
.toString(36)
|
||||
.replace(/[^a-z]+/g, '')
|
||||
.substr(0, 5)}`;
|
||||
|
@ -92,7 +92,7 @@ class Requests {
|
||||
event: serializer.serialize(event) || {},
|
||||
input: serializer.serialize(this.context.lowdefy.inputs[this.context.id]),
|
||||
lowdefyGlobal: serializer.serialize(this.context.lowdefy.lowdefyGlobal),
|
||||
pageId: this.context.lowdefy.pageId,
|
||||
pageId: this.context.pageId,
|
||||
state: serializer.serialize(this.context.state),
|
||||
urlQuery: serializer.serialize(this.context.lowdefy.urlQuery),
|
||||
},
|
||||
|
@ -75,6 +75,7 @@ const getContext = async ({ block, contextId, lowdefy }) => {
|
||||
eventLog: [],
|
||||
requests: {},
|
||||
lowdefy,
|
||||
pageId: lowdefy.pageId,
|
||||
rootBlock: blockData(block), // filter block to prevent circular structure
|
||||
showValidationErrors: false,
|
||||
state: {},
|
||||
|
Loading…
Reference in New Issue
Block a user