"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.tryOnScopeDispose = tryOnScopeDispose;
var _vueDemi = require("vue-demi");
/**
 * Call onScopeDispose() if it's inside a effect scope lifecycle, if not, do nothing
 *
 * @param fn
 */
function tryOnScopeDispose(fn) {
  if ((0, _vueDemi.getCurrentScope)()) {
    (0, _vueDemi.onScopeDispose)(fn);
    return true;
  }
  return false;
}