I have found the awnser.
So my svf was saved as a raw string in my state and when the page loaded it was being encoded using Buffer.
To solve my issue i encoded the svg string with Buffer at the moment of upload and kept the encoded string as state so i didn't have to encode it when a page loads in.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…