Answered
Is there a way to determine if all four values of insetSpacing are 0?
Like this:
If all four values are 0, I modify it.
Otherwise, if the first value is greater than 0, I don't modify it.
Like this:
If all four values are 0, I modify it.
Otherwise, if the first value is greater than 0, I don't modify it.
@dublove Exactly as @Manan Joshi rightly said a better way is to be direct, not hidden type coercion:
if (
textFramePreferences.insetSpacing[0] === 0
&& textFramePreferences.insetSpacing[1] === 0
&& textFramePreferences.insetSpacing[2] === 0
&& textFramePreferences.insetSpacing[3] === 0
) {
// do something
}Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.