Skip to content

Commit 503db3e

Browse files
committed
Merge pull request #13 from brendanoffer/master
Match regex match beginning of location.href only
2 parents 7ce0f2c + fd2f7d8 commit 503db3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/angular-environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ angular.module('environment', []).
8787

8888
angular.forEach(this.data.domains, function(v, k) {
8989
angular.forEach(v, function(v) {
90-
if (location.match('//' + v)) {
90+
if (location.match(new RegExp("^http(s)?:\/\/" + v))) {
9191
self.environment = k;
9292
}
9393
});

0 commit comments

Comments
 (0)