function getResourceLocation(res, state) {
    const loc = accessBodyProperty(res, "resourceLocation");
    if (loc && typeof loc === "string") {
        state.config.resourceLocation = loc;
    }
    return state.config.resourceLocation;
}
The expansion here is intentional because `lro` could be an object that
references an inner this, so we need to preserve a reference to it.