Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(topology-description): we can't use Object.values yet
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed May 23, 2018
1 parent bb0c522 commit 91df350
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/sdam/topology_description.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ class TopologyDescription {
// value among ServerDescriptions of all data-bearing server types. If any have a null
// logicalSessionTimeoutMinutes, then TopologyDescription.logicalSessionTimeoutMinutes MUST be
// set to null.
const readableServers = Object.values(this.servers).filter(s => s.isReadable);
const readableServers = Object.keys(this.servers)
.map(s => this.servers[s])
.filter(s => s.isReadable);

this.logicalSessionTimeoutMinutes = readableServers.reduce((result, server) => {
if (server.logicalSessionTimeoutMinutes == null) return null;
if (result == null) return server.logicalSessionTimeoutMinutes;
Expand Down

0 comments on commit 91df350

Please sign in to comment.