Set default value for use_diff_viewer in custom prompts if undefined. see #109
This commit is contained in:
parent
dc8fb0b792
commit
99c70df10c
1 changed files with 5 additions and 0 deletions
|
|
@ -339,6 +339,11 @@ async function getCustomPrompts() {
|
||||||
if(prefs._custom_prompt === null){
|
if(prefs._custom_prompt === null){
|
||||||
return [];
|
return [];
|
||||||
} else {
|
} else {
|
||||||
|
prefs._custom_prompt.forEach(prompt => {
|
||||||
|
if (prompt.use_diff_viewer === undefined) {
|
||||||
|
prompt.use_diff_viewer = "0";
|
||||||
|
}
|
||||||
|
});
|
||||||
return prefs._custom_prompt;
|
return prefs._custom_prompt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue