mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	input_pill: Refactor payload object in appendValidatedData function.
				
					
				
			Refactored `payload` object such that when we migrate this module to typescript, we will not have to write an incomplete type definition for this object.
This commit is contained in:
		| @@ -89,12 +89,6 @@ export function create(opts) { | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             const payload = { | ||||
|                 item, | ||||
|             }; | ||||
|  | ||||
|             store.pills.push(payload); | ||||
|  | ||||
|             const has_image = item.img_src !== undefined; | ||||
|  | ||||
|             const opts = { | ||||
| @@ -120,7 +114,12 @@ export function create(opts) { | ||||
|             } | ||||
|  | ||||
|             const pill_html = render_input_pill(opts); | ||||
|             payload.$element = $(pill_html); | ||||
|             const payload = { | ||||
|                 item, | ||||
|                 $element: $(pill_html), | ||||
|             }; | ||||
|  | ||||
|             store.pills.push(payload); | ||||
|             store.$input.before(payload.$element); | ||||
|         }, | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user