Skip to content

Commit f1f1327

Browse files
committed
Fix the issue in getEngineType, we shouldn't memoize the result of getEngineType
1 parent a04374a commit f1f1327

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/helpers/loadDocument.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,12 @@ const getDocOptions = (state, dispatch, streaming) => {
238238
});
239239
};
240240

241-
let engineType;
242241
const getEngineType = state => {
243-
if (engineType) {
244-
return engineType;
245-
}
246-
247242
const docName = getDocName(state);
248243
const fileExtension = getDocumentExtension(docName);
249244
const { pdftronServer } = state.advanced;
250245

251-
engineType = state.advanced.engineType;
246+
let engineType = state.advanced.engineType;
252247
if (engineType === engineTypes.AUTO) {
253248
if (fileExtension === 'xod') {
254249
engineType = engineTypes.UNIVERSAL;

0 commit comments

Comments
 (0)