There was an error while loading. Please reload this page.
1 parent 2146fe4 commit 446a3b7Copy full SHA for 446a3b7
1 file changed
handwritten/bigtable/src/cluster.js
@@ -35,20 +35,7 @@ class Cluster {
35
this.bigtable = instance.bigtable;
36
this.instance = instance;
37
38
- var name;
39
-
40
- if (id.includes('/')) {
41
- if (id.includes(`${instance.name}/clusters/`)) {
42
- name = id;
43
- } else {
44
- throw new Error(
45
- `Cluster id '${id}' is not formatted correctly.
46
-Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`
47
- );
48
- }
49
50
- name = `${instance.name}/clusters/${id}`;
51
+ const name = `${instance.name}/clusters/${id}`;
52
this.id = name.split('/').pop();
53
this.name = name;
54
}
0 commit comments