mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
refactor: Refactor the arguments of the Flag Operator
This commit is contained in:
@@ -57,7 +57,7 @@ function doMigrationV2() {
|
||||
|
||||
// 5. delete builtin rules
|
||||
delete $.cache.builtin;
|
||||
$.info('Migration complete!');
|
||||
$.info('Migration complete!');
|
||||
|
||||
function migrateDisplayName(item) {
|
||||
const displayName = item['display-name'];
|
||||
@@ -110,6 +110,13 @@ function doMigrationV2() {
|
||||
}
|
||||
} else if (p.type.indexOf('Keyword') !== -1) {
|
||||
// drop keyword operators and keyword filters
|
||||
} else if (p.type === 'Flag Operator') {
|
||||
// set default args
|
||||
const add = typeof p.args === 'undefined' ? true : p.args;
|
||||
p.args = {
|
||||
mode: add ? 'add' : 'remove',
|
||||
};
|
||||
newProcesses.push(p);
|
||||
} else {
|
||||
newProcesses.push(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user