Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1876,7 +1876,7 @@ QScriptValue ScriptEngine::require(const QString& moduleId, bool forceRedownload · 1875 unmodified lines | ||
| 1876 | 1876 | // `delete Script.require.cache[Script.require.resolve(moduleId)];` |
| 1877 | 1877 | |
| 1878 | 1878 | // 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()); | |
| 1880 | 1880 | |
| 1881 | 1881 | // reset the cacheMeta record so invalidation won't apply next time, even if the module fails to load |
| 1882 | 1882 | cacheMeta.setProperty(modulePath, QScriptValue()); |