I got a paycheck and W2 in 2019 for work done in NY (+tax paid) as a nonresident in 2018. I didn't work in NY in 2019. Do I actually owe tax to NY?

The paycheck had partial withholdings to NY and to my resident state. I know that whenever I work a single day in NY, NY wants a portion of my taxes equivalent to number of days spent in NY for work. I was in NY for a few days in 2018 while I was performing work for which I got paid in 2019, but didn't work there in 2019. Do I owe any tax to New York for 2019?