Skip to content

Commit

Permalink
Remove unused imports, improve const name
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Oct 9, 2024
1 parent 4d56a7f commit 12fa019
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shell/plugins/dashboard-store/mutations.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { markRaw, reactive, toRaw, toRef } from 'vue';
import { markRaw, reactive } from 'vue';
import { addObject, addObjects, clear, removeObject } from '@shell/utils/array';
import { SCHEMA, COUNT } from '@shell/config/types';
import { normalizeType, keyFieldFor } from '@shell/plugins/dashboard-store/normalize';
Expand Down Expand Up @@ -46,17 +46,17 @@ function registerType(state, type) {
}

export function replace(existing, data) {
const keyMap = {};
const existingPropertyMap = {};

for ( const k of Object.keys(existing) ) {
delete existing[k];
keyMap[k] = true;
existingPropertyMap[k] = true;
}

let newProperty = false;

for ( const k of Object.keys(data) ) {
if (!newProperty && !keyMap[k]) {
if (!newProperty && !existingPropertyMap[k]) {
newProperty = true;
}

Expand Down

0 comments on commit 12fa019

Please sign in to comment.