chunk-NRHG7SAN.js 483 B

123456789101112131415161718192021222324
  1. import {
  2. isAny
  3. } from "./chunk-L5SG54UC.js";
  4. import {
  5. isString
  6. } from "./chunk-4AK4GF4H.js";
  7. // node_modules/.pnpm/bpmn-js@16.3.2/node_modules/bpmn-js/lib/features/modeling/util/ModelingUtil.js
  8. function getParent(element, anyType) {
  9. if (isString(anyType)) {
  10. anyType = [anyType];
  11. }
  12. while (element = element.parent) {
  13. if (isAny(element, anyType)) {
  14. return element;
  15. }
  16. }
  17. return null;
  18. }
  19. export {
  20. getParent
  21. };
  22. //# sourceMappingURL=chunk-NRHG7SAN.js.map