Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix preset dropdown always defaulting to 'no preset' #2401

Merged

Conversation

canstudios-nicolaw
Copy link
Contributor

Fixes #2379

In https://github.com/adaptlearning/adapt_authoring/pull/2371/files in plugins/content/config/index.js the following was removed

var configModel = records[0].toObject();
configModel._enabledComponents = uniqueComponentList;
return next(null, [configModel]);

and replaced with

return next(null, [records[0]]);

This missing .toObject led to the following change 33600c3#diff-6cb64d73a547a24bfc001f80bb7192dc

These two things meant that the _themePreset value was no longer being saved. Fixing these things allows the last selected preset to be saved successfully which fixes this issue.

To test
Select a theme
Select a preset
Save
Open theme editing page, theme and preset should be selected
Change theme
Return to original theme, preset should be selected

@canstudios-nicolaw canstudios-nicolaw added this to the Bugpatch milestone Jul 30, 2019
@canstudios-nicolaw canstudios-nicolaw self-assigned this Jul 30, 2019
@canstudios-nicolaw canstudios-nicolaw merged commit 6a18942 into adaptlearning:release/bugpatch Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants