Skip to content

Commit

Permalink
fix: Accurate text
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Jan 19, 2024
1 parent 3ae3f90 commit 9428248
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ErrorType, selectSdkOperationError } from '../../../redux/sdk'
import { Warning } from '../Warning'

const mapError = {
[ErrorType.AncestorSelected]: 'An ancestor of this entity is already selected.'
[ErrorType.ChildSelected]: 'A child of this entity is already selected.'
}

const SdkOperation: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function updateSelectedEntity(engine: IEngine) {

for (const [currentlySelectedEntity] of engine.getEntitiesWith(Selection)) {
if (multiple && isAncestorOf(entity, currentlySelectedEntity, nodes as Node[])) {
return { success: false, error: ErrorType.AncestorSelected }
return { success: false, error: ErrorType.ChildSelected }
}

Check warning on line 39 in packages/@dcl/inspector/src/lib/sdk/operations/update-selected-entity.ts

View check run for this annotation

Codecov / codecov/patch

packages/@dcl/inspector/src/lib/sdk/operations/update-selected-entity.ts#L36-L39

Added lines #L36 - L39 were not covered by tests
if (currentlySelectedEntity !== entity) {
Expand Down
2 changes: 1 addition & 1 deletion packages/@dcl/inspector/src/redux/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PayloadAction, createSlice } from '@reduxjs/toolkit'
import { RootState } from '../store'

export enum ErrorType {
AncestorSelected = 'ancestor-selected'
ChildSelected = 'child-selected'
}

export interface EngineState {
Expand Down

0 comments on commit 9428248

Please sign in to comment.