Skip to content

Commit 0ed7a5f

Browse files
author
jin
committed
+1
1 parent 21e432d commit 0ed7a5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest/resource/resource.node.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ namespace $ {
88
REQUEST( msg: $mol_rest_message ) {
99

1010
const [ path, nest, tail ] = /^\/([a-zA-Z][^/]*)(.*)$/.exec( msg.uri().pathname ) ?? []
11-
const field = nest.toLowerCase()
11+
const field = nest?.toLowerCase()
1212

13-
if( field in this && !( field in $mol_rest_resource.prototype ) ) {
13+
if( field && field in this && !( field in $mol_rest_resource.prototype ) ) {
1414

1515
const uri2 = makeURL( msg.uri().toString() )
1616
uri2.pathname = tail ?? msg.uri().pathname

0 commit comments

Comments
 (0)