Skip to content

Commit f146ef8

Browse files
committed
fix: add naive null check for minimapElement
1 parent dc078fe commit f146ef8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/minimap.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,9 @@ export default class Minimap {
10881088
* @return {DecorationManagement}
10891089
*/
10901090
getDecorationManagement () {
1091-
if (this.DecorationManagement === undefined) {
1091+
if (this.DecorationManagement === undefined &&
1092+
this.minimapElement // TODO: find why this becomes null: https://github.com/atom-minimap/minimap/issues/766
1093+
) {
10921094
this.DecorationManagement = this.minimapElement.DecorationManagement
10931095
}
10941096
return this.DecorationManagement

0 commit comments

Comments
 (0)