File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,11 @@ func (r *R) resourceParts(parts []string) *R {
101101// Resource defines a new resource below current resource
102102func (r * R ) Resource (locator string ) * R {
103103
104- locator = strings .TrimPrefix (locator , "/" )
105104 if locator == "" {
106105 return r
107106 }
108107
108+ locator = strings .TrimPrefix (locator , "/" )
109109 parts := strings .Split (locator , "/" )
110110
111111 return r .resourceParts (parts )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ func TestR_Resource_BaseCaseSlash(t *testing.T) {
3636 root := NewResource ()
3737 r := root .Resource ("/" )
3838
39- AssertEqual (t , r , root )
39+ AssertEqual (t , r , root . children [ 0 ] )
4040}
4141
4242func TestR_Resource_NextCase (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments