Fix a bug where a null value for custom modifiers would break

This commit is contained in:
cmdr2 2022-10-21 14:43:32 +05:30
parent 93bf93d3a1
commit a53bac1a94
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@
<script src="media/js/plugins.js?v=1"></script>
<script src="media/js/utils.js?v=3"></script>
<script src="media/js/inpainting-editor.js?v=1"></script>
<script src="media/js/image-modifiers.js?v=1"></script>
<script src="media/js/image-modifiers.js?v=2"></script>
<script src="media/js/auto-save.js?v=1"></script>
<script src="media/js/main.js?v=3"></script>
<script src="media/js/themes.js?v=1"></script>

View File

@ -270,7 +270,7 @@ function loadCustomModifiers() {
customModifiersGroupElement.remove()
}
if (customModifiers.trim() !== '') {
if (customModifiers && customModifiers.trim() !== '') {
customModifiers = customModifiers.split('\n')
customModifiers = customModifiers.filter(m => m.trim() !== '')
customModifiers = customModifiers.map(function(m) {