`|| mode === ""` seems redundant since that will already satisfy `!mode`