replace map with WeakMap

This commit is contained in:
Vyrtsev Mikhail
2019-08-04 17:22:41 +03:00
parent f0750c2433
commit e92cce20c0
@@ -10,7 +10,7 @@ interface State {
ref: Element | undefined;
}
const instance_map: Map<Element, Component<Props, State>> = new Map();
const instance_map: WeakMap<Element, Component<Props, State>> = new WeakMap();
const observer = new IntersectionObserver(
entries => {