fix: cleanup from #7029 (#7328)

* refactor: fix issues arose from #7029

* refactor: move replaceAll -> replace in makeKeyString

* fix: move order of escape to backslash first

* style: lint
This commit is contained in:
Tristan F 2023-12-28 15:39:28 -05:00 committed by GitHub
parent 5af491382e
commit 68e60e332e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 13 deletions

View File

@ -99,7 +99,9 @@ function makeKeyString(identifier) {
return identifier.key;
}
return [identifier.namespace.replace(/:/g, '\\:'), identifier.key].join(':');
return [identifier.namespace.replace(/\\/g, '\\\\').replace(/:/g, '\\:'), identifier.key].join(
':'
);
}
/**

View File

@ -35,7 +35,7 @@ export default function (options) {
return !options || options.type === d.type;
},
view: function (domainObject) {
return new AutoflowTabularView(domainObject, openmct, document);
return new AutoflowTabularView(domainObject, openmct);
}
});
};

View File

@ -34,8 +34,9 @@
</template>
<script>
import { sanitizeUrl } from '@braintree/sanitize-url';
import tooltipHelpers from '../../../api/tooltips/tooltipMixins';
const sanitizeUrl = require('@braintree/sanitize-url').sanitizeUrl;
export default {
mixins: [tooltipHelpers],

View File

@ -34,7 +34,7 @@
</template>
<script>
const sanitizeUrl = require('@braintree/sanitize-url').sanitizeUrl;
import { sanitizeUrl } from '@braintree/sanitize-url';
export default {
inject: ['domainObject'],

View File

@ -44,12 +44,11 @@
</template>
<script>
import momentDurationFormatSetup from 'moment-duration-format';
import moment from 'moment-timezone';
import raf from 'utils/raf';
import throttle from '../../../utils/throttle';
const moment = require('moment-timezone');
const momentDurationFormatSetup = require('moment-duration-format');
const refreshRateSeconds = 2;
momentDurationFormatSetup(moment);

View File

@ -26,7 +26,7 @@
</template>
<script>
const sanitizeUrl = require('@braintree/sanitize-url').sanitizeUrl;
import { sanitizeUrl } from '@braintree/sanitize-url';
export default {
inject: ['openmct', 'domainObject'],

View File

@ -19,11 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global module*/
const LocationBar = require('location-bar');
const EventEmitter = require('EventEmitter');
const _ = require('lodash');
import EventEmitter from 'EventEmitter';
import LocationBar from 'location-bar';
import _ from 'lodash';
class ApplicationRouter extends EventEmitter {
/**
@ -430,4 +429,4 @@ function paramsToObject(searchParams) {
return params;
}
module.exports = ApplicationRouter;
export default ApplicationRouter;