Skip to content

Commit

Permalink
Missed fixes for _init
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangSenff authored Oct 19, 2024
1 parent 9c7797f commit 5765439
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addons/godot-firebase/firestore/firestore_document.gd
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func _init(doc : Dictionary = {}):
document = doc.fields
if doc.has("name"):
doc_name = doc.name
if doc_name.count("/") > 2:
doc_name = (doc_name.split("/") as Array).back()

self.create_time = doc.createTime
if doc_name.count("/") > 2:
doc_name = (doc_name.split("/") as Array).back()
if doc.has("createTime"):
self.create_time = doc.createTime

func replace(with : FirestoreDocument, is_listener := false) -> void:
var current = document.duplicate()
Expand Down

0 comments on commit 5765439

Please sign in to comment.