sap.ui.core.IconPool -- allows to override sap standard icons
OpenUI5 version: any
Browser/version (+device/version): any
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible):
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
- sap.ui.core.IconPool.addIcon("somename", "undefined", {...})
Just use the string "undefined" as a collection name and you will be able to override the standard icons.
What is the expected result?
According to messages from the library itself it seems not allowed to override icons.
What happens instead?
Any other information? (attach screenshot if possible)
The reason for this is, that somewhere in the IconPool code is only checking if the collection name "is" undefined (meaning of undefined variable) it will "not" check if the collection name is filled with the string value "undefined". Later in the code (IconPool) the collection name is used as a lookup.
SAP standard icons will have the (string key == "undefined") for looking it up. Since the undefined state of a javascript variable will be converted to the string "undefined" this will have the same effect.
So if you plan to prevent overriding the standard icons you should also check for the string "undefined" :) Or just ignore this issue.
Hi @SomeStrangeName , Thank you for your findings. I have created an internal incident: 1770011552 Regards, Diana
Hi @SomeStrangeName ,
thank you for reporting the issue. It's solved and the fix is merged into nightly build. We decided not to downport this fix to the released branch since it's a minor issue (but a very important one :)). The fix will be found from version 1.48 and can be consumed from now in nightly build.
Best regards, Jiawei