#2827 remove online validator badge for specs hosted locally

This commit is contained in:
Anna Bodnia
2017-03-30 18:55:16 +03:00
parent 1df4df67c1
commit 161dc57cd5
3 changed files with 11 additions and 10 deletions

View File

@@ -33,7 +33,8 @@ export default class OnlineValidatorBadge extends React.Component {
if ( typeof spec === "object" && Object.keys(spec).length) return null
if (!this.state.url || !this.state.validatorUrl) {
if (!this.state.url || !this.state.validatorUrl || this.state.url.indexOf("localhost") >= 0
|| this.state.url.indexOf("127.0.0.1") >= 0) {
return null
}