Skip to content

Commit 9845377

Browse files
zhanggangbencevans
authored andcommitted
fix(osx): Capture multiple displays of the same type
1 parent 0f8a2c6 commit 9845377

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/darwin/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,19 @@ function makeSubtree (currIndent, subtree, entries) {
105105
while ((entry = entries.shift())) {
106106
if (entry.value === '') {
107107
if (currIndent < entry.indent) {
108+
while (entry.key in subtree) {
109+
entry.key += '_1'
110+
}
108111
subtree[entry.key] = {}
109112
makeSubtree(entry.indent, subtree[entry.key], entries)
110113
} else {
111114
entries.unshift(entry)
112115
return
113116
}
114117
} else {
118+
while (entry.key in subtree) {
119+
entry.key += '_1'
120+
}
115121
subtree[entry.key] = entry.value
116122
}
117123
}

0 commit comments

Comments
 (0)