Where do I allocate my taxable refund from NY that I received in 2017? Is it 100% portioned to NY on non-resident return OR my resident (NJ) state return, where I live?

I am filing a non-resident NY state return because I worked in NY, but I live in NJ. In doing my non-resident return for NY, it is asking what portion of my taxable state refund is sourced from NY (Last year I got a refund from NY state and owed money to NJ)