Merge pull request #6756 from joeflynn/quota-exceeded
ensure storage is writable when setting support flag. fixes #6755
This commit is contained in:
commit
f883f62eaf
|
@ -8,6 +8,9 @@ jQuery( function( $ ) {
|
||||||
/** Cart Handling */
|
/** Cart Handling */
|
||||||
try {
|
try {
|
||||||
$supports_html5_storage = ( 'sessionStorage' in window && window.sessionStorage !== null );
|
$supports_html5_storage = ( 'sessionStorage' in window && window.sessionStorage !== null );
|
||||||
|
|
||||||
|
window.sessionStorage.setItem( 'wc', 'test' );
|
||||||
|
window.sessionStorage.removeItem( 'wc' );
|
||||||
} catch( err ) {
|
} catch( err ) {
|
||||||
$supports_html5_storage = false;
|
$supports_html5_storage = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue