Use test instead of match wherever possible

This commit is contained in:
Steffen van Bergerem 2015-04-01 18:35:20 +02:00
parent 6e1b5397cb
commit f8707e0e1a
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ app.models.Stream = Backbone.Collection.extend({
},
sortOrder : function() {
return this.basePath().match(/activity/) ? "interactedAt" : "createdAt";
return /activity/.test(this.basePath()) ? "interactedAt" : "createdAt";
},
/* This function is for adding a large number of posts one by one.

View file

@ -10,7 +10,7 @@ $(document).ready(function(){
});
$(window).bind("popstate", function(){
if (location.href.match(/conversations\/\d+/) !== null) {
if (/conversations\/\d+/.test(location.href)) {
$.getScript(location.href, function() {
Diaspora.page.directionDetector.updateBinds();
});