mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 21:37:24 +00:00
fix jsRef free error
This commit is contained in:
@@ -41,11 +41,11 @@ abstract class JSRef {
|
||||
if (cache.contains(obj)) return;
|
||||
if (obj is List) {
|
||||
cache.add(obj);
|
||||
obj.forEach((e) => _callRecursive(e, cb, cache));
|
||||
List.from(obj).forEach((e) => _callRecursive(e, cb, cache));
|
||||
}
|
||||
if (obj is Map) {
|
||||
cache.add(obj);
|
||||
obj.values.forEach((e) => _callRecursive(e, cb, cache));
|
||||
obj.values.toList().forEach((e) => _callRecursive(e, cb, cache));
|
||||
}
|
||||
if (obj is JSRef) {
|
||||
cb(obj);
|
||||
|
Reference in New Issue
Block a user