refactor(core,composables): remove error from useNodeId
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user