Skip to content

Fix import of ../utils and ./utils #49

Description

@westurner

I'm only able to get devtools to run (with rojo translating ../utils to script.Parent.Parent:WaitForChild('utils') if I change this in react-devtools-shared/src/backend/renderer.luau :

#ocalutils=require(script.Parent:WaitForChild('utils')) #doesnotworklocalutils=require(script.Parent.Parent:WaitForChild('utils')) #doeswork

So, I think it should be this, because getUID() is in utils not backend/utils:

localutils=require("../utils") 

localutils=require("./utils")
localdeletePathInObject=utils.deletePathInObject
localgetDisplayName=utils.getDisplayName
localgetDefaultComponentFilters=utils.getDefaultComponentFilters
localgetInObject=utils.getInObject
localgetUID=utils.getUID
localrenamePathInObject=utils.renamePathInObject
localsetInObject=utils.setInObject
-- ROBLOX deviation: Don't encode strings
-- local utfEncodeString = utils.utfEncodeString
localstorage=require("../storage")
localsessionStorageGetItem=storage.sessionStorageGetItem
localbackendUtils=require("./utils")
localcleanForBridge=backendUtils.cleanForBridge
localcopyToClipboard=backendUtils.copyToClipboard
localcopyWithDelete=backendUtils.copyWithDelete
localcopyWithRename=backendUtils.copyWithRename
localcopyWithSet=backendUtils.copyWithSet

Otherwise getUID() and getDisplayName() etc are nil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions