From ec145a0e82dde428f5fe434a96c99447fd773fac Mon Sep 17 00:00:00 2001 From: Chris Hines <chris.hines@monash.edu> Date: Fri, 16 Oct 2020 10:25:17 +1100 Subject: [PATCH] look for string equality not substring --- src/app/strudelapp.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app/strudelapp.ts b/src/app/strudelapp.ts index 93fbc6d..434343e 100644 --- a/src/app/strudelapp.ts +++ b/src/app/strudelapp.ts @@ -29,12 +29,8 @@ export class Strudelapp { let uriname = decodeURIComponent(name); for ( let item of applist) { sapp = <Strudelapp>item; - //let sname = sapp.name.toLowerCase().replace(/\s/g, ''); - //let jname = name.toLowerCase().replace(/\s/g, ''); let sname = sapp.name; - idx = sname.indexOf(jname); - idxURI = sname.indexOf(uriname); - if (idx == 0 || idxURI == 0) { + if (sname === jname || sname === uriname) { app = item; return app; } -- GitLab