Welcome to mirror list, hosted at ThFree Co, Russian Federation.

utils.js « diff_viewer « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 97143d90c3f4fb9ee75fab6ee76117e5a2b24fbd (plain)
1
2
3
4
5
6
7
8
9
10
11
import { RENAMED_DIFF_TRANSITIONS } from '~/diffs/constants';

export const transition = (currentState, transitionEvent) => {
  const key = `${currentState}:${transitionEvent}`;

  if (RENAMED_DIFF_TRANSITIONS[key]) {
    return RENAMED_DIFF_TRANSITIONS[key];
  }

  return currentState;
};