Commit 0155d897 authored by Jonne Haß's avatar Jonne Haß

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

Use test instead of match wherever possible
parents 099bb010 f8707e0e
......@@ -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.
......
......@@ -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();
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment