@@ -184,7 +184,12 @@ UrlMatcher.prototype.concat = function (pattern, config) {
184
184
// Because order of search parameters is irrelevant, we can add our own search
185
185
// parameters to the end of the new pattern. Parse the new pattern by itself
186
186
// and then join the bits together, but it's much easier to do this on a string level.
187
- return $$UMFP . compile ( this . sourcePath + pattern + this . sourceSearch , config ) ;
187
+ var defaultConfig = {
188
+ caseInsensitive : $$UMFP . caseInsensitive ( ) ,
189
+ strict : $$UMFP . strictMode ( ) ,
190
+ squash : $$UMFP . defaultSquashPolicy ( )
191
+ } ;
192
+ return new UrlMatcher ( this . sourcePath + pattern + this . sourceSearch , extend ( defaultConfig , config ) ) ;
188
193
} ;
189
194
190
195
UrlMatcher . prototype . toString = function ( ) {
@@ -587,9 +592,12 @@ function $UrlMatcherFactory() {
587
592
* Defines whether URL matching should be case sensitive (the default behavior), or not.
588
593
*
589
594
* @param {boolean } value `false` to match URL in a case sensitive manner; otherwise `true`;
595
+ * @return the current value of caseInsensitive
590
596
*/
591
597
this . caseInsensitive = function ( value ) {
592
- isCaseInsensitive = value ;
598
+ if ( isDefined ( value ) )
599
+ isCaseInsensitive = value ;
600
+ return isCaseInsensitive ;
593
601
} ;
594
602
595
603
/**
@@ -600,10 +608,13 @@ function $UrlMatcherFactory() {
600
608
* @description
601
609
* Defines whether URLs should match trailing slashes, or not (the default behavior).
602
610
*
603
- * @param {boolean } value `false` to match trailing slashes in URLs, otherwise `true`.
611
+ * @param {boolean= } value `false` to match trailing slashes in URLs, otherwise `true`.
612
+ * @return the current value of strictMode
604
613
*/
605
614
this . strictMode = function ( value ) {
606
- isStrictMode = value ;
615
+ if ( isDefined ( value ) )
616
+ isStrictMode = value ;
617
+ return isStrictMode ;
607
618
} ;
608
619
609
620
/**
0 commit comments