Skip to content
Snippets Groups Projects
Commit eee23c2a authored by Janis Streib's avatar Janis Streib :owl:
Browse files

FIXUP: numeric check

parent 3e1d8d8f
No related branches found
No related tags found
No related merge requests found
Pipeline #274960 passed with warnings
......@@ -346,7 +346,7 @@ export default {
this.descriminator = this.getSearchDiscriminator()
const term = this.cutDescriminator().trim()
const termIsIP = ipaddress.isValid(term.split('/')[0])
const termIsNumeric = !isNaN(parseInt(term))
const termIsNumeric = /^(0|[1-9][0-9]*)$/.test(term)
if (this.descriminator == null) { // Nur is_own, ohne regex
if (termIsNumeric) {
this.dispatch_search(SearchService.searchVlan(this.$store.state.netdb_axios_config, parseInt(term)), 'nd.vlan')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment