mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 16:53:32 +02:00
Apply suggestions from code review
Co-authored-by: HifiExperiments <53453710+HifiExperiments@users.noreply.github.com> Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
parent
d25adf9b6f
commit
8a007a4edf
2 changed files with 2 additions and 2 deletions
libraries/script-engine/src
|
@ -1876,7 +1876,7 @@ QScriptValue ScriptEngine::require(const QString& moduleId, bool forceRedownload
|
|||
// `delete Script.require.cache[Script.require.resolve(moduleId)];`
|
||||
|
||||
// cacheMeta is just used right now to tell deleted keys apart from undefined ones
|
||||
bool invalidateCache = (module.isUndefined() && cacheMeta.property(moduleId).isValid()) || forceRedownload;
|
||||
bool invalidateCache = forceRedownload || (module.isUndefined() && cacheMeta.property(moduleId).isValid());
|
||||
|
||||
// reset the cacheMeta record so invalidation won't apply next time, even if the module fails to load
|
||||
cacheMeta.setProperty(modulePath, QScriptValue());
|
||||
|
|
|
@ -422,7 +422,7 @@ public:
|
|||
* @function Script.require
|
||||
* @param {string} module - The module to use. May be a JavaScript file, a JSON file, or the name of a system module such
|
||||
* as <code>"appUi"</code> (i.e., the "appUi.js" system module JavaScript file).
|
||||
* @param {bool} [forceRedownload=false] - Invalidate the cache for this module and redownload it if necessary.
|
||||
* @param {boolean} [forceRedownload=false] - Invalidate the cache for this module and redownload it if necessary.
|
||||
* @returns {object|array} The value assigned to <code>module.exports</code> in the JavaScript file, or the value defined
|
||||
* in the JSON file.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue