fix: limit the length of the client value shown in the error

pull/12396/head
paoloricciuti 2 years ago
parent 301987fe10
commit 4137491fd0

@ -16,7 +16,8 @@ function check_hash_in_dev_hydration(server_hash, value) {
if (!DEV) return;
if (!server_hash || server_hash === hash(value)) return;
w.hydration_html_changed(String(value));
// limit the length of the value shown in the error as this might get lengthy
w.hydration_html_changed(`${value.slice(0, 25)}${value.length > 25 ? '...' : ''}`);
}
/**

Loading…
Cancel
Save