As long as it is just demos, prioritize bug fixes solely around the demo path – other bugs may need to wait.
If the demo is to be left behind to be used by users not working on the project, then when the features are at MVP level, bugs must be taken care of.
Of course, if you don't fix the bugs, eventually the tech debt will catch up with you - especially if you are hacking your way to a shippable product. At some point you should stop and ask whether the time has come for you to harden the code for productization. At that point - you should prioritize dealing with bugs over new features, to make sure you ship a quality product that delights your customers.