Values repeating when values adding to Globals in layout

I have created a master layout for my web application in which I am storing items of menu for dashboard with their routing links, icons etc in view global.
When page renders index.edge, all work fine, when I move to create.edge item.path repeated.
Example:
on index : item.child.path= ‘/dashboard/user/create’
on create: item.child.path= ‘/dashboard/user/dashboard/user/create’

why it is repeating when calling another view ? is it looping again in sidebar.edge, if yes, then how to handle this ?

//DashboradController.js

             let privilege_id = '1'
            let menu = await menuService.getMenu(privilege_id)
            console.log(menu)
            View.global('menu', menu)
            return view.render('dashboard.index', { menu: menu })

layout is like this

|--view
     |--dashboard
          |-- index.edge
          |-- create.edge
     |-- layout
          |-- dashboard
               |-- partials
                    |-- header.edge
                    |-- nav.edge
                    |-- sidebar.edge
                    |-- footer.edge
               |-- master.edge

my menu items comes in sidebar.edge every page index.edge and create.edge use master layout at top.

//create.js / index.js
@layout('layout.dashboard.master')
@section('content')
<!-- HTML content starts here for create user / index -->
@endsection

this is how sidebar is written

<div class="menu_section">
      <h3>General Section</h3>
      <ul class="nav side-menu">
        @each(item in menu)
        <li>
          @if(item.path != null)
          <a  href="{{item.path}}">
          @else
          <a>
          @endif
          <i class="{{item.icon}}"></i> {{item.name}}
          @if(item.child_menu.length > 0)
          <span class="fa fa-chevron-down"></span>
          @else
          <span class=""></span>
          @endif
        </a>
          @if(item.child_menu.length > 0)
          <ul class="nav child_menu">
            @each(child in item.child_menu)
            <li><a href="{{child.path}}">{{child.name}}</a></li>
            @endeach
          </ul>
          @endif
        </li>
        @endeach 
      </ul>
    </div>

Is your menu object correct in here?
Haven’t used Edge myself, but it seems like case of missing / in start of some URL