UNPKG

@atlaskit/editor-plugin-metrics

Version:

Metrics plugin for @atlaskit/editor-core

16 lines (15 loc) 481 B
import { ActionType } from '../types'; export var checkStatusChanged = function checkStatusChanged(step) { var slice = step.slice; var firstChild = slice.content.firstChild; if (!firstChild) { return undefined; } // Get statusId so that we can track whether edits are performed on same status node return firstChild.type.name === 'status' ? { type: ActionType.UPDATING_STATUS, extraData: { statusId: firstChild.attrs.localId } } : undefined; };