UNPKG

motion

Version:

motion - moving development forward

18 lines (13 loc) 574 B
exports.__esModule = true; var _libWrapState = require('../lib/wrapState'); var _libHelpers = require('../lib/helpers'); exports['default'] = { exit: function exit(node, parent, scope) { // view.update() before return if (node.motionReturnTracked) return; node.motionReturnTracked = true; var parentFunc = _libHelpers.parentFunctionNode(scope); if (parentFunc && !parentFunc.body.motionView && (parentFunc.motionStateMutativeFunction || parentFunc.hasSetter)) return [_libWrapState.updateState(), node]; } }; module.exports = exports['default'];