mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-11-04 01:23:01 +00:00 
			
		
		
		
	Introduce JSON parse utility function with error handling (#6401)
* Introduce JSON parse utility function with error handling Fixes #6400 * Fix typo
This commit is contained in:
		@@ -18,7 +18,7 @@ exports.path = /^\/recipes\/default\/tiddlers\/(.+)$/;
 | 
			
		||||
 | 
			
		||||
exports.handler = function(request,response,state) {
 | 
			
		||||
	var title = $tw.utils.decodeURIComponentSafe(state.params[0]),
 | 
			
		||||
	fields = JSON.parse(state.data);
 | 
			
		||||
	fields = $tw.utils.parseJSONSafe(state.data);
 | 
			
		||||
	// Pull up any subfields in the `fields` object
 | 
			
		||||
	if(fields.fields) {
 | 
			
		||||
		$tw.utils.each(fields.fields,function(field,name) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user