Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'+ +' not correctly minified #28

Open
Bartheyrman22 opened this issue Dec 12, 2018 · 0 comments
Open

'+ +' not correctly minified #28

Bartheyrman22 opened this issue Dec 12, 2018 · 0 comments

Comments

@Bartheyrman22
Copy link

'+ +' not correctly minified and becomes '++'. See minified code below.

Environment:
php 7.2
natxet/CssMin 3.0.4

Original function:

function getBordersSize(styles, axis) {
    var sideA = axis === 'x' ? 'Left' : 'Top';
    var sideB = sideA === 'Left' ? 'Right' : 'Bottom';

    return +styles['border' + sideA + 'Width'].split('px')[0] + +styles['border' + sideB + 'Width'].split('px')[0];
}

A minified function:

function getBordersSize(styles,axis){var sideA=axis==='x'?'Left':'Top';var sideB=sideA==='Left'?'Right':'Bottom';return+styles['border'+sideA+'Width'].split('px')[0]++styles['border'+sideB+'Width'].split('px')[0];}

Best regards,
Bart Heyrman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant