Skip to content

Commit 68e60e3

Browse files
authored
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
1 parent 5af4913 commit 68e60e3

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

src/api/objects/object-utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ function makeKeyString(identifier) {
9999
return identifier.key;
100100
}
101101

102-
return [identifier.namespace.replace(/:/g, '\\:'), identifier.key].join(':');
102+
return [identifier.namespace.replace(/\\/g, '\\\\').replace(/:/g, '\\:'), identifier.key].join(
103+
':'
104+
);
103105
}
104106

105107
/**

src/plugins/autoflow/AutoflowTabularPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function (options) {
3535
return !options || options.type === d.type;
3636
},
3737
view: function (domainObject) {
38-
return new AutoflowTabularView(domainObject, openmct, document);
38+
return new AutoflowTabularView(domainObject, openmct);
3939
}
4040
});
4141
};

src/plugins/conditionWidget/components/ConditionWidget.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
</template>
3535

3636
<script>
37+
import { sanitizeUrl } from '@braintree/sanitize-url';
38+
3739
import tooltipHelpers from '../../../api/tooltips/tooltipMixins';
38-
const sanitizeUrl = require('@braintree/sanitize-url').sanitizeUrl;
3940

4041
export default {
4142
mixins: [tooltipHelpers],

src/plugins/hyperlink/HyperlinkLayout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</template>
3535

3636
<script>
37-
const sanitizeUrl = require('@braintree/sanitize-url').sanitizeUrl;
37+
import { sanitizeUrl } from '@braintree/sanitize-url';
3838

3939
export default {
4040
inject: ['domainObject'],

src/plugins/timer/components/TimerComponent.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,11 @@
4444
</template>
4545

4646
<script>
47+
import momentDurationFormatSetup from 'moment-duration-format';
48+
import moment from 'moment-timezone';
4749
import raf from 'utils/raf';
4850

4951
import throttle from '../../../utils/throttle';
50-
51-
const moment = require('moment-timezone');
52-
const momentDurationFormatSetup = require('moment-duration-format');
5352
const refreshRateSeconds = 2;
5453

5554
momentDurationFormatSetup(moment);

src/plugins/webPage/components/WebPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</template>
2727

2828
<script>
29-
const sanitizeUrl = require('@braintree/sanitize-url').sanitizeUrl;
29+
import { sanitizeUrl } from '@braintree/sanitize-url';
3030

3131
export default {
3232
inject: ['openmct', 'domainObject'],

src/ui/router/ApplicationRouter.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
* this source code distribution or the Licensing information page available
2020
* at runtime from the About dialog for additional information.
2121
*****************************************************************************/
22-
/*global module*/
2322

24-
const LocationBar = require('location-bar');
25-
const EventEmitter = require('EventEmitter');
26-
const _ = require('lodash');
23+
import EventEmitter from 'EventEmitter';
24+
import LocationBar from 'location-bar';
25+
import _ from 'lodash';
2726

2827
class ApplicationRouter extends EventEmitter {
2928
/**
@@ -430,4 +429,4 @@ function paramsToObject(searchParams) {
430429
return params;
431430
}
432431

433-
module.exports = ApplicationRouter;
432+
export default ApplicationRouter;

0 commit comments

Comments
 (0)