FLUID-4349: Improve fluid.allocateSimpleId() to handle the case where element is not defined

Metadata

Source
FLUID-4349
Type
Improvement
Priority
Minor
Status
Closed
Resolution
Fixed
Assignee
N/A
Reporter
Harris Wong
Created
2011-07-20T17:11:35.150-0400
Updated
2011-08-10T15:21:23.922-0400
Versions
N/A
Fixed Versions
  1. 1.4
Component
  1. Framework

Description

The current fluid.allocateSimpleId(element) does not handle the case where "element" is undefined. This function can be improved as follow:
When the element is undefined, then return the "fluid-id-" + fluid.allocateGuid(); if the element is there, perform the old behavior. We probably want to update the unit test as well.

framework/core/js/Fluid.js line 1699~1705.

Environments

N/A

Comments