Skip to content

Commit bd3d5c6

Browse files
committed
fix create topic during internal publish
1 parent 73a0a5e commit bd3d5c6

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/topics/local-topic-host.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,15 @@ class LocalTopicHost {
135135
await topic.publish(data, sender)
136136
}
137137

138-
async publishInternal(path, data){
139-
const topic = this.getTopic(path, false)
138+
async publishInternal(path, data, create=false){
139+
const topic = this.getTopic(path, create)
140140

141141
debug('publishInternal', path)
142142

143-
await topic.publish(data)
143+
if(topic){
144+
await topic.publish(data)
145+
}
146+
144147
}
145148

146149
async destroyNode(peer){

0 commit comments

Comments
 (0)