Skip to content

Commit d28edda

Browse files
committed
Fix the issue in getEngineType, we shouldn't memoize the result of getEngineType
1 parent 8a3bd07 commit d28edda

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
@@ -208,17 +208,12 @@ const getDocOptions = (state, dispatch, streaming) => {
208208
});
209209
};
210210

211-
let engineType;
212211
const getEngineType = state => {
213-
if (engineType) {
214-
return engineType;
215-
}
216-
217212
const docName = getDocName(state);
218213
const fileExtension = getDocumentExtension(docName);
219214
const { pdftronServer } = state.advanced;
220215

221-
engineType = state.advanced.engineType;
216+
let engineType = state.advanced.engineType;
222217
if (engineType === engineTypes.AUTO) {
223218
if (fileExtension === 'xod') {
224219
engineType = engineTypes.UNIVERSAL;

0 commit comments

Comments
 (0)