Muscle and fasting


I read somewhere that fasting causes the body to burn muscle first instead of fat. So I have a belief that by fasting for too long (basically not eating when I’m hungry), I will lose muscle. I realize that this is a thought thats affecting my behavior. I don’t know if I should change the thought that I have or if there is some scientific basis for what I read.