mirror of
https://github.com/esiur/esiur-js.git
synced 2025-05-06 20:42:58 +00:00
getTemplateByClassName
This commit is contained in:
parent
fffce4d595
commit
270474ac78
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "esiur",
|
"name": "esiur",
|
||||||
"version": "2.0.6",
|
"version": "2.0.7",
|
||||||
"description": "Distributed Object Framework",
|
"description": "Distributed Object Framework",
|
||||||
"main": "esiur.js",
|
"main": "esiur.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -2263,10 +2263,10 @@ export default class DistributedConnection extends IStore {
|
|||||||
|
|
||||||
getTemplateByClassName(className) {
|
getTemplateByClassName(className) {
|
||||||
|
|
||||||
let template = this.templates.find((x)=>x.className == className);
|
let templates = this.templates.filter({ className: className });
|
||||||
if (template != null)
|
|
||||||
return new AsyncReply(template);
|
|
||||||
|
|
||||||
|
if (templates.length > 0)
|
||||||
|
return new AsyncReply(templates[0]);
|
||||||
else if (this.templateByNameRequests.contains(className))
|
else if (this.templateByNameRequests.contains(className))
|
||||||
return this.templateByNameRequests.item(className);
|
return this.templateByNameRequests.item(className);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user