refactor(core,composables): remove error from useNodeId

This commit is contained in:
braks
2024-02-05 07:51:12 +01:00
committed by Braks
parent d001d802b5
commit aab31f8296
+1 -8
View File
@@ -2,12 +2,5 @@ import { inject } from 'vue'
import { NodeId } from '../context'
export function useNodeId() {
const nodeId = inject(NodeId, null)
if (!nodeId) {
// todo: emit error through hook
throw new Error('useNodeId must be called inside a Node component')
}
return nodeId
return inject(NodeId, null)
}