Merge pull request #5839 from svbergerem/use-test-instead-of-match

Use test instead of match wherever possible
This commit is contained in:
Jonne Haß 2015-04-01 23:54:42 +02:00
commit 0155d8972a
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();
});