Fixing re-display of regex

This commit is contained in:
Jeff Avallone 2014-12-06 10:36:23 -05:00
parent 4af501b37b
commit 5fcb0758a3
1 changed files with 2 additions and 2 deletions

View File

@ -30,14 +30,14 @@ export default class Regexper {
}
hashchangeListener() {
var expression = decodeURIComponent(location.hash.slice(1)).replace(/[\r\n]/g, '');
var expression = decodeURIComponent(location.hash.slice(1));
if (expression !== '') {
this.field.value = expression;
this.setState('is-loading');
this.renderRegexp(expression)
this.renderRegexp(expression.replace(/[\r\n]/g, ''))
.then((() => {
this.setState('has-results');
this.updateLinks();