[node] throw if a render is already pending, fixes #2247
This commit is contained in:
@@ -186,6 +186,10 @@ NAN_METHOD(NodeMap::Render) {
|
||||
return Nan::ThrowTypeError("Style is not loaded");
|
||||
}
|
||||
|
||||
if (nodeMap->callback) {
|
||||
return Nan::ThrowError("Map is currently rendering an image");
|
||||
}
|
||||
|
||||
auto options = ParseOptions(info[0]->ToObject());
|
||||
|
||||
assert(!nodeMap->callback);
|
||||
|
||||
Reference in New Issue
Block a user