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