mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 17:08:57 +00:00
[Code Style] Rename shadowing variables
This commit is contained in:
@ -82,7 +82,7 @@ define(
|
||||
return mutationResult && self.invoke().then(findObject);
|
||||
}
|
||||
|
||||
function addIdToModel(model) {
|
||||
function addIdToModel(objModel) {
|
||||
// Pick a specific index if needed.
|
||||
index = isNaN(index) ? composition.length : index;
|
||||
// Also, don't put past the end of the array
|
||||
@ -90,11 +90,11 @@ define(
|
||||
|
||||
// Remove the existing instance of the id
|
||||
if (oldIndex !== -1) {
|
||||
model.composition.splice(oldIndex, 1);
|
||||
objModel.composition.splice(oldIndex, 1);
|
||||
}
|
||||
|
||||
// ...and add it back at the appropriate index.
|
||||
model.composition.splice(index, 0, id);
|
||||
objModel.composition.splice(index, 0, id);
|
||||
}
|
||||
|
||||
// If no index has been specified already and the id is already
|
||||
|
@ -62,9 +62,9 @@ define(
|
||||
}
|
||||
|
||||
// Package capabilities as key-value pairs
|
||||
function packageCapabilities(capabilities) {
|
||||
function packageCapabilities(caps) {
|
||||
var result = {};
|
||||
capabilities.forEach(function (capability) {
|
||||
caps.forEach(function (capability) {
|
||||
if (capability.key) {
|
||||
result[capability.key] =
|
||||
result[capability.key] || capability;
|
||||
|
@ -124,9 +124,9 @@ define(
|
||||
clone = JSON.parse(JSON.stringify(model)),
|
||||
useTimestamp = arguments.length > 1;
|
||||
|
||||
function notifyListeners(model) {
|
||||
function notifyListeners(newModel) {
|
||||
generalTopic.notify(domainObject);
|
||||
specificTopic.notify(model);
|
||||
specificTopic.notify(newModel);
|
||||
}
|
||||
|
||||
// Function to handle copying values to the actual
|
||||
|
@ -124,8 +124,8 @@ define(
|
||||
this.persistenceService.createObject;
|
||||
|
||||
// Update persistence timestamp...
|
||||
domainObject.useCapability("mutation", function (model) {
|
||||
model.persisted = modified;
|
||||
domainObject.useCapability("mutation", function (m) {
|
||||
m.persisted = modified;
|
||||
}, modified);
|
||||
|
||||
// ...and persist
|
||||
|
Reference in New Issue
Block a user