mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 11:44:09 -05:00
Fix: page refresh restores default code
This commit is contained in:
@@ -369,7 +369,9 @@ function findConfig(defaultConfig: ConfigType, options: CompilerExplorerOptions,
|
||||
const savedState = sessionThenLocalStorage.get('gl', null);
|
||||
if (savedState) config = JSON.parse(savedState);
|
||||
}
|
||||
if (!config.layout || !config.layout.content || config.layout.content === 0) config = defaultConfig;
|
||||
if (!config.content || config.content.length === 0) {
|
||||
config = defaultConfig;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
config = _.extend(
|
||||
|
||||
Reference in New Issue
Block a user