Skip to content

Commit 1558964

Browse files
authored
Merge pull request #403 from CVEProject/tat-39-40
#39 relabel and relocate cve record keyword search link and fix display of erroneous empty cve record
2 parents 7f02cc0 + e85cc07 commit 1558964

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/components/PrimaryNavigation.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@
6060
</nav>
6161

6262
<nav id="cve-secondary-navbar" class="navbar" aria-label="navigation">
63-
<div class="navbar-menu cve-secondary-navbar-menu is-active">
64-
<div class="navbar-start" style="flex-grow: 1 !important; justify-content: center !important;">
63+
<div class="navbar-menu cve-secondary-navbar-menu is-active" style="display: block">
64+
<div class="navbar-start" style="flex-grow: 1 !important; align-items: center !important; justify-content: center !important;
65+
flex-direction: column !important">
6566
<div class="navbar-item cve-secondary-navbar-item">
6667
<cveRecordLookup/>
6768
</div>
6869
<div class="navbar-item cve-secondary-navbar-item cve-keyword-search">
69-
<span class="icon-text">
70+
<span class="icon-text" style="font-size: 14px">
7071
<a href="https://cve.mitre.org/cve/search_cve_list.html" target="_blank" class="cve-dark-blue-text">
71-
Need a CVE ID? Find one here by keyword
72+
Need a CVE Record? Find one by keyword on cve.mitre.org
7273
<span class="icon cve-icon-xxs" style="margin-left: 0px;">
7374
<p id="CVERecordsKeywordSearch" class="is-hidden">external site</p>
7475
<font-awesome-icon icon="external-link-alt" aria-labelledby="CVERecordsKeywordSearch">

src/components/cveRecordLookupModule.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,16 @@ export default ({
143143
axios
144144
.get(url, { timeout: 30000 })
145145
.then((res) => {
146+
const response = res;
146147
this.$store.commit('updateState', { showHelpText: false });
147148
this.$store.commit('updateState', { isSearching: false });
148149
149-
if (res.status === 200) {
150-
if (Object.prototype.hasOwnProperty.call(res.data, 'error')) {
150+
if (response.status === 200 && typeof response.data === 'object') {
151+
if (Object.prototype.hasOwnProperty.call(response.data, 'error')) {
151152
self.$store.commit('updateState', { error: true });
152153
}
153154
154-
this.handleCveRecordDisplay(res.data);
155+
this.handleCveRecordDisplay(response.data);
155156
} else {
156157
this.handleServerError();
157158
}

0 commit comments

Comments
 (0)