File "getUAGEditorStateLocalStorage.js"

Full path: C:/Inetpub/vhosts/drshti.com/httpdocs/wp-content/plugins/ultimate-addons-for-gutenberg/blocks-config/uagb-controls/getUAGEditorStateLocalStorage.js
File size: 372 B (372 B bytes)
MIME-type: text/plain
Charset: utf-8

Download   Open   Edit   Advanced Editor &nnbsp; Back

const getUAGEditorStateLocalStorage = ( key = false ) => {
	if ( ! window.localStorage ) {
		return null;
	}

	if ( ! key ) {
		return localStorage;
	}

	const uagLastOpenedSettingState = localStorage.getItem( key );

	if ( uagLastOpenedSettingState ) {
		return JSON.parse( uagLastOpenedSettingState );
	}

	return null;
};

export default getUAGEditorStateLocalStorage;