Skip to content

Commit

Permalink
fix: remove Array.prototype.includes in Popper
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeLin committed Nov 19, 2021
1 parent 67f7aaa commit 5344d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/zarm/src/popper/index.tsx
Expand Up @@ -2,7 +2,7 @@ import React, { HTMLAttributes } from 'react';
import ReactDOM, { createPortal } from 'react-dom';
import PopperJS from 'popper.js';
import classnames from 'classnames';

import includes from 'lodash/includes';
import ClickOutside from '../click-outside';
import { canUseDOM, getOuterSizes } from '../utils/dom';
import BasePopperProps, { PopperPlacement, directionMap } from './PropsType';
Expand Down Expand Up @@ -181,7 +181,7 @@ class Popper extends React.Component<PopperProps, PopperStates> {
const placement = this.popperNode!.getAttribute('x-placement');

if (animationType === 'menuSlide' && placement) {
if (placement.includes('top')) {
if (includes(placement, 'top')) {
return `za-${animationType}-down-${animationState}`;
}
return `za-${animationType}-up-${animationState}`;
Expand Down

0 comments on commit 5344d0b

Please sign in to comment.