History

Apply suggestions from code review

kasenvr committed 6 years ago

Commit 8a007a41 parent d25adf92 files · +2 −2Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 2 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+1−1
@@ -1876,7 +1876,7 @@ QScriptValue ScriptEngine::require(const QString& moduleId, bool forceRedownload · 1875 unmodified lines
18761876 // `delete Script.require.cache[Script.require.resolve(moduleId)];`
18771877
18781878 // cacheMeta is just used right now to tell deleted keys apart from undefined ones
1879− bool invalidateCache = (module.isUndefined() && cacheMeta.property(moduleId).isValid()) || forceRedownload;
1879+ bool invalidateCache = forceRedownload || (module.isUndefined() && cacheMeta.property(moduleId).isValid());
18801880
18811881 // reset the cacheMeta record so invalidation won't apply next time, even if the module fails to load
18821882 cacheMeta.setProperty(modulePath, QScriptValue());