Skip to content

Commit

Permalink
+1
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Jan 26, 2024
1 parent 21e432d commit 0ed7a5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rest/resource/resource.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace $ {
REQUEST( msg: $mol_rest_message ) {

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

if( field in this && !( field in $mol_rest_resource.prototype ) ) {
if( field && field in this && !( field in $mol_rest_resource.prototype ) ) {

const uri2 = makeURL( msg.uri().toString() )
uri2.pathname = tail ?? msg.uri().pathname
Expand Down

0 comments on commit 0ed7a5f

Please sign in to comment.