Skip to content

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

@westurner

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 :

#ocal utils = require(script.Parent:WaitForChild('utils'))        # does not work
local utils = require(script.Parent.Parent:WaitForChild('utils'))  # does work

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

local utils = require("../utils") 

local utils = require("./utils")
local deletePathInObject = utils.deletePathInObject
local getDisplayName = utils.getDisplayName
local getDefaultComponentFilters = utils.getDefaultComponentFilters
local getInObject = utils.getInObject
local getUID = utils.getUID
local renamePathInObject = utils.renamePathInObject
local setInObject = utils.setInObject
-- ROBLOX deviation: Don't encode strings
-- local utfEncodeString = utils.utfEncodeString
local storage = require("../storage")
local sessionStorageGetItem = storage.sessionStorageGetItem
local backendUtils = require("./utils")
local cleanForBridge = backendUtils.cleanForBridge
local copyToClipboard = backendUtils.copyToClipboard
local copyWithDelete = backendUtils.copyWithDelete
local copyWithRename = backendUtils.copyWithRename
local copyWithSet = backendUtils.copyWithSet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions