Customize: Fix logic inversion in determining whether a URL is previewable which prevented previewing anything but homepage.

Fixes regression introduced in [38890].

See #38409.
Fixes #38492.


git-svn-id: https://develop.svn.wordpress.org/trunk@38926 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2016-10-25 20:52:58 +00:00
parent ea3b41d8e3
commit 87e7c0cd96
2 changed files with 2 additions and 2 deletions

View File

@@ -4173,7 +4173,7 @@
_.find( parsedCandidateUrls, function( parsedCandidateUrl ) {
return ! _.isUndefined( _.find( previewer.allowedUrls, function( allowedUrl ) {
parsedAllowedUrl.href = allowedUrl;
if ( urlParser.protocol === parsedAllowedUrl.protocol && urlParser.host === parsedAllowedUrl.host && 0 === parsedAllowedUrl.pathname.indexOf( urlParser.pathname ) ) {
if ( urlParser.protocol === parsedAllowedUrl.protocol && urlParser.host === parsedAllowedUrl.host && 0 === urlParser.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) ) ) {
result = parsedCandidateUrl.href;
return true;
}