From e78da3304dc5b07a0fd634b24e12a525d5f73b79 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Wed, 29 Apr 2020 17:22:51 -0700 Subject: [PATCH] Examples: Simplified tags code. --- examples/index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/index.html b/examples/index.html index 0283dcf324..e1224fa963 100644 --- a/examples/index.html +++ b/examples/index.html @@ -249,9 +249,8 @@ var link = links[ file ]; var name = getName( file ); - var matchCandidates = ( tags[ file ] || [] ).slice(); - matchCandidates.push( file ); - var res = matchCandidates.join( ' ' ).match( exp ); + if ( file in tags ) file += tags[ file ].join( ' ' ); + var res = file.match( exp ); var text; if ( res && res.length > 0 ) { -- GitLab