Restore the default copy count to 1
This commit is contained in:
parent
b121beff5a
commit
82fa427305
@ -30,11 +30,12 @@ function unload() {
|
|||||||
// Creates a test button during development that calls unload() to clean up.
|
// Creates a test button during development that calls unload() to clean up.
|
||||||
testProjectScript();
|
testProjectScript();
|
||||||
|
|
||||||
|
// TODO: allow setting a default copy count
|
||||||
// Hack to override the default return value of 1
|
// Hack to override the default return value of 1
|
||||||
function copyCount(copies_list, name) {
|
function copyCount(copies_list, name) {
|
||||||
const entries = copies_list.getListEntries().map(x => String(x));
|
const entries = copies_list.getListEntries().map(x => String(x));
|
||||||
if (entries.indexOf(String(name)) == -1) {
|
if (entries.indexOf(String(name)) == -1) {
|
||||||
return 2;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return copies_list.getCopyCount(name);
|
return copies_list.getCopyCount(name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user