Skip to content

Commit b1044f1

Browse files
authored
Merge pull request #46 from jonnelaakso/master
2 parents 1cbc6a2 + 3722d65 commit b1044f1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Ember/Server/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ export class EmberServer extends EventEmitter<EmberServerEvents> {
122122
const data = berEncode([el], RootType.Elements)
123123
let elPath = el.path
124124
if (el.contents.type !== ElementType.Node && !('targets' in update || 'sources' in update)) {
125-
elPath = elPath.slice(0, -2) // remove the last element number
125+
const lastDotIndex = elPath.lastIndexOf('.')
126+
if (lastDotIndex > -1) {
127+
elPath = elPath.slice(0, lastDotIndex)
128+
} else {
129+
elPath = ''
130+
}
126131
}
127132

128133
for (const [path, clients] of Object.entries<S101Socket[]>(this._subscriptions)) {

0 commit comments

Comments
 (0)