Skip to content

Commit

Permalink
fix(ios): fix callOrWait callback can be reentrant (#3530)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfazekas authored Jun 14, 2024
1 parent 0bcf8bb commit c05b9a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios/RNMBX/RNMBXMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ class InitWaiter<Type> {
/// call whan the object has inited, queued calls will be executed
func onInit(_ object: Type) {
self.object = object
waiters.forEach { $0(object) }
let oldWaiters = waiters
waiters = []
oldWaiters.forEach { $0(object) }
}

/// reset, calls will be queued again
Expand Down

0 comments on commit c05b9a2

Please sign in to comment.