From 831968d29a186ac39f7ccc235360e18f59677c96 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Fri, 9 Aug 2019 09:53:10 -0400 Subject: [PATCH] refactor(cursor): return operation readPreference with priority --- lib/cursor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cursor.js b/lib/cursor.js index 03b543cf9f..6e8ac07891 100644 --- a/lib/cursor.js +++ b/lib/cursor.js @@ -159,6 +159,10 @@ class Cursor extends CoreCursor { } get readPreference() { + if (this.operation) { + return this.operation.readPreference; + } + return this.options.readPreference; }